pub struct FpFunctor<'a, Map, Cod> { /* private fields */ }
Expand description
A functor out of a finitely presented (f.p.) category.
Like a Function
, this struct borrows its data. Unlike
a Mapping
between sets, a codomain is needed not just for validation but to
even evaluate the functor on morphisms, hence is required as extra data. The
domain category is needed only for validation.
Implementations§
Source§impl<'a, V, E, Ob, Mor, Map, Cod> FpFunctor<'a, Map, Cod>
impl<'a, V, E, Ob, Mor, Map, Cod> FpFunctor<'a, Map, Cod>
Sourcepub fn validate_on<S: BuildHasher>(
&self,
dom: &FpCategory<V, E, S>,
) -> Result<(), NonEmpty<InvalidFpFunctor<V, E>>>
pub fn validate_on<S: BuildHasher>( &self, dom: &FpCategory<V, E, S>, ) -> Result<(), NonEmpty<InvalidFpFunctor<V, E>>>
Validates that the functor is well-defined on the given f.p. category.
Sourcepub fn iter_invalid_on<'b, S: BuildHasher>(
&'b self,
dom: &'b FpCategory<V, E, S>,
) -> impl Iterator<Item = InvalidFpFunctor<V, E>> + 'b
pub fn iter_invalid_on<'b, S: BuildHasher>( &'b self, dom: &'b FpCategory<V, E, S>, ) -> impl Iterator<Item = InvalidFpFunctor<V, E>> + 'b
Iterates over failures to be functorial on the given f.p. category.
Trait Implementations§
Source§impl<'a, Ob, Mor, Map, Cod> CategoryMap for FpFunctor<'a, Map, Cod>
impl<'a, Ob, Mor, Map, Cod> CategoryMap for FpFunctor<'a, Map, Cod>
Source§type DomOb = <Map as GraphMapping>::DomV
type DomOb = <Map as GraphMapping>::DomV
Type of objects in domain category.
Source§type DomMor = Path<<Map as GraphMapping>::DomV, <Map as GraphMapping>::DomE>
type DomMor = Path<<Map as GraphMapping>::DomV, <Map as GraphMapping>::DomE>
Type of morphisms in domain category.
Source§type ObMap = <Map as GraphMapping>::VertexMap
type ObMap = <Map as GraphMapping>::VertexMap
Type of underlying mapping on objects.
Source§type MorMap = FpFunctorMorMap<'a, Map, Cod>
type MorMap = FpFunctorMorMap<'a, Map, Cod>
Type of underlying mapping on morphisms.
Source§fn apply_mor(&self, m: Self::DomMor) -> Option<Self::CodMor>
fn apply_mor(&self, m: Self::DomMor) -> Option<Self::CodMor>
Applies the mapping to a morphism.
Source§fn is_ob_assigned(&self, x: &Self::DomOb) -> bool
fn is_ob_assigned(&self, x: &Self::DomOb) -> bool
Is the mapping defined at an object?
Source§fn is_mor_assigned(&self, m: &Self::DomMor) -> bool
fn is_mor_assigned(&self, m: &Self::DomMor) -> bool
Is the mapping defined at a morphism?
Source§impl<'a, Ob, Mor, Map, Cod> FgCategoryMap for FpFunctor<'a, Map, Cod>
impl<'a, Ob, Mor, Map, Cod> FgCategoryMap for FpFunctor<'a, Map, Cod>
Source§type ObGen = <Map as GraphMapping>::DomV
type ObGen = <Map as GraphMapping>::DomV
Type of object generators in domain category.
Source§type MorGen = <Map as GraphMapping>::DomE
type MorGen = <Map as GraphMapping>::DomE
Type of morphism generators in domain category.
Source§type ObGenMap = <Map as GraphMapping>::VertexMap
type ObGenMap = <Map as GraphMapping>::VertexMap
Type of underlying mapping from object generators to objects.
Source§type MorGenMap = <Map as GraphMapping>::EdgeMap
type MorGenMap = <Map as GraphMapping>::EdgeMap
Type of underlying mapping from morphism generators to morphisms.
Source§fn ob_generator_map(&self) -> &Self::ObGenMap
fn ob_generator_map(&self) -> &Self::ObGenMap
Gets the underlying mapping from object generators to objects.
Source§fn mor_generator_map(&self) -> &Self::MorGenMap
fn mor_generator_map(&self) -> &Self::MorGenMap
Gets the underlying mapping from morphism generators to morphisms.
Auto Trait Implementations§
impl<'a, Map, Cod> Freeze for FpFunctor<'a, Map, Cod>
impl<'a, Map, Cod> RefUnwindSafe for FpFunctor<'a, Map, Cod>where
Map: RefUnwindSafe,
Cod: RefUnwindSafe,
impl<'a, Map, Cod> Send for FpFunctor<'a, Map, Cod>
impl<'a, Map, Cod> Sync for FpFunctor<'a, Map, Cod>
impl<'a, Map, Cod> Unpin for FpFunctor<'a, Map, Cod>
impl<'a, Map, Cod> UnwindSafe for FpFunctor<'a, Map, Cod>where
Map: RefUnwindSafe,
Cod: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.