Trait CategoryMap

Source
pub trait CategoryMap {
    type DomOb: Eq + Clone;
    type DomMor: Eq + Clone;
    type CodOb: Eq + Clone;
    type CodMor: Eq + Clone;
    type ObMap: Mapping<Dom = Self::DomOb, Cod = Self::CodOb>;
    type MorMap: Mapping<Dom = Self::DomMor, Cod = Self::CodMor>;

    // Required methods
    fn ob_map(&self) -> &Self::ObMap;
    fn mor_map(&self) -> &Self::MorMap;

    // Provided methods
    fn apply_ob(&self, x: Self::DomOb) -> Option<Self::CodOb> { ... }
    fn apply_mor(&self, m: Self::DomMor) -> Option<Self::CodMor> { ... }
    fn is_ob_assigned(&self, x: &Self::DomOb) -> bool { ... }
    fn is_mor_assigned(&self, m: &Self::DomMor) -> bool { ... }
}
Expand description

A mapping between categories.

Analogous to a mapping between sets or graphs, a category mapping is a functor without specified domain or codomain categories.

Required Associated Types§

Source

type DomOb: Eq + Clone

Type of objects in domain category.

Source

type DomMor: Eq + Clone

Type of morphisms in domain category.

Source

type CodOb: Eq + Clone

Type of objects in codomain category.

Source

type CodMor: Eq + Clone

Type of morphisms in codomain category.

Source

type ObMap: Mapping<Dom = Self::DomOb, Cod = Self::CodOb>

Type of underlying mapping on objects.

Source

type MorMap: Mapping<Dom = Self::DomMor, Cod = Self::CodMor>

Type of underlying mapping on morphisms.

Required Methods§

Source

fn ob_map(&self) -> &Self::ObMap

Gets the underlying mapping on objects.

Source

fn mor_map(&self) -> &Self::MorMap

Gets the underlying mapping on morphisms.

Provided Methods§

Source

fn apply_ob(&self, x: Self::DomOb) -> Option<Self::CodOb>

Applies the mapping to an object.

Source

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

Is the mapping defined at an object?

Source

fn is_mor_assigned(&self, m: &Self::DomMor) -> bool

Is the mapping defined at a morphism?

Implementors§

Source§

impl<'a, Ob, Mor, Map, Cod> CategoryMap for FpFunctor<'a, Map, Cod>
where Ob: Eq + Clone, Mor: Eq + Clone, Map: GraphMapping<CodV = Ob, CodE = Mor>, Cod: Category<Ob = Ob, Mor = Mor>,

Source§

type DomOb = <Map as GraphMapping>::DomV

Source§

type DomMor = Path<<Map as GraphMapping>::DomV, <Map as GraphMapping>::DomE>

Source§

type CodOb = Ob

Source§

type CodMor = Mor

Source§

type ObMap = <Map as GraphMapping>::VertexMap

Source§

type MorMap = FpFunctorMorMap<'a, Map, Cod>