Trait VDblCategory

Source
pub trait VDblCategory {
    type Ob: Eq + Clone;
    type Arr: Eq + Clone;
    type Pro: Eq + Clone;
    type Cell: Eq + Clone;

Show 19 methods // Required methods fn has_ob(&self, ob: &Self::Ob) -> bool; fn has_arrow(&self, arr: &Self::Arr) -> bool; fn has_proarrow(&self, pro: &Self::Pro) -> bool; fn has_cell(&self, cell: &Self::Cell) -> bool; fn dom(&self, f: &Self::Arr) -> Self::Ob; fn cod(&self, f: &Self::Arr) -> Self::Ob; fn src(&self, m: &Self::Pro) -> Self::Ob; fn tgt(&self, m: &Self::Pro) -> Self::Ob; fn cell_dom(&self, cell: &Self::Cell) -> Path<Self::Ob, Self::Pro>; fn cell_cod(&self, cell: &Self::Cell) -> Self::Pro; fn cell_src(&self, cell: &Self::Cell) -> Self::Arr; fn cell_tgt(&self, cell: &Self::Cell) -> Self::Arr; fn compose(&self, path: Path<Self::Ob, Self::Arr>) -> Self::Arr; fn compose_cells( &self, tree: DblTree<Self::Arr, Self::Pro, Self::Cell>, ) -> Self::Cell; // Provided methods fn arity(&self, cell: &Self::Cell) -> usize { ... } fn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr { ... } fn id(&self, x: Self::Ob) -> Self::Arr { ... } fn compose_cells2( &self, αs: impl IntoIterator<Item = Self::Cell>, β: Self::Cell, ) -> Self::Cell where Self: Sized { ... } fn id_cell(&self, m: Self::Pro) -> Self::Cell { ... }
}
Expand description

A virtual double category (VDC).

See the module-level docs for background on VDCs.

Required Associated Types§

Source

type Ob: Eq + Clone

Type of objects in the VDC.

Source

type Arr: Eq + Clone

Type of arrows (tight morphisms) in the VDC.

Source

type Pro: Eq + Clone

Type of proarrows (loose morphisms) in the VDC.

Source

type Cell: Eq + Clone

Type of cells in the VDC;

Required Methods§

Source

fn has_ob(&self, ob: &Self::Ob) -> bool

Does the object belong to the VDC?

Source

fn has_arrow(&self, arr: &Self::Arr) -> bool

Does the arrow belong to the VDC?

Source

fn has_proarrow(&self, pro: &Self::Pro) -> bool

Does the proarrow belong to the VDC?

Source

fn has_cell(&self, cell: &Self::Cell) -> bool

Does the cell belong to the VDC?

Source

fn dom(&self, f: &Self::Arr) -> Self::Ob

Gets the domain of an arrow.

Source

fn cod(&self, f: &Self::Arr) -> Self::Ob

Gets the codomain of an arrow.

Source

fn src(&self, m: &Self::Pro) -> Self::Ob

Gets the source of a proarrow.

Source

fn tgt(&self, m: &Self::Pro) -> Self::Ob

Gets the target of a proarrow.

Source

fn cell_dom(&self, cell: &Self::Cell) -> Path<Self::Ob, Self::Pro>

Gets the domain of a cell, a path of proarrows.

Source

fn cell_cod(&self, cell: &Self::Cell) -> Self::Pro

Gets the codomain of a cell, a single proarrow.

Source

fn cell_src(&self, cell: &Self::Cell) -> Self::Arr

Gets the source of a cell, an arrow.

Source

fn cell_tgt(&self, cell: &Self::Cell) -> Self::Arr

Gets the target of a cell, an edge.

Source

fn compose(&self, path: Path<Self::Ob, Self::Arr>) -> Self::Arr

Composes a path of arrows in the VDC.

Source

fn compose_cells( &self, tree: DblTree<Self::Arr, Self::Pro, Self::Cell>, ) -> Self::Cell

Composes a tree of cells in the VDC.

Provided Methods§

Source

fn arity(&self, cell: &Self::Cell) -> usize

Gets the arity of a cell.

The default implementation returns the length of the cell’s domain.

Source

fn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr

Composes a pair of arrows with compatible (co)domains.

Source

fn id(&self, x: Self::Ob) -> Self::Arr

Constructs the identity arrow at an object.

Source

fn compose_cells2( &self, αs: impl IntoIterator<Item = Self::Cell>, β: Self::Cell, ) -> Self::Cell
where Self: Sized,

Composes a two-layer pasting of cells.

Source

fn id_cell(&self, m: Self::Pro) -> Self::Cell

Constructs the identity cell on a proarrow.

Implementors§

Source§

impl VDblCategory for catlog::dbl::category::WalkingBimodule::Main

Source§

impl VDblCategory for catlog::dbl::category::WalkingFunctor::Main

Source§

impl VDblCategory for WalkingCategory

Source§

impl<C: FgCategory> VDblCategory for DiscreteDblTheory<C>
where C::Ob: Clone, C::Mor: Clone,

Source§

type Ob = <C as Category>::Ob

Source§

type Arr = <C as Category>::Ob

Source§

type Pro = <C as Category>::Mor

Source§

type Cell = Path<<C as Category>::Ob, <C as Category>::Mor>

Source§

impl<G: VDblGraph> VDblCategory for FreeVDblCategory<G>
where G::ProE: Debug,

Source§

type Ob = <G as VDblGraph>::V

Source§

type Arr = Path<<G as VDblGraph>::V, <G as VDblGraph>::E>

Source§

type Pro = <G as VDblGraph>::ProE

Source§

type Cell = DblTree<<G as VDblGraph>::E, <G as VDblGraph>::ProE, <G as VDblGraph>::Sq>

Source§

impl<V, E, S> VDblCategory for DiscreteTabTheory<V, E, S>
where V: Eq + Clone + Hash, E: Eq + Clone + Hash, S: BuildHasher,

Source§

type Ob = TabObType<V, E>

Source§

type Arr = Path<TabObType<V, E>, TabObProj<V, E>>

Source§

type Pro = TabMorType<V, E>

Source§

type Cell = TabMorOp<V, E>