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§
Required Methods§
Sourcefn has_proarrow(&self, pro: &Self::Pro) -> bool
fn has_proarrow(&self, pro: &Self::Pro) -> bool
Does the proarrow belong to the VDC?
Sourcefn cell_dom(&self, cell: &Self::Cell) -> Path<Self::Ob, Self::Pro>
fn cell_dom(&self, cell: &Self::Cell) -> Path<Self::Ob, Self::Pro>
Gets the domain of a cell, a path of proarrows.
Sourcefn cell_cod(&self, cell: &Self::Cell) -> Self::Pro
fn cell_cod(&self, cell: &Self::Cell) -> Self::Pro
Gets the codomain of a cell, a single proarrow.
Provided Methods§
Sourcefn arity(&self, cell: &Self::Cell) -> usize
fn arity(&self, cell: &Self::Cell) -> usize
Gets the arity of a cell.
The default implementation returns the length of the cell’s domain.
Sourcefn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr
fn compose2(&self, f: Self::Arr, g: Self::Arr) -> Self::Arr
Composes a pair of arrows with compatible (co)domains.
Sourcefn compose_cells2(
&self,
αs: impl IntoIterator<Item = Self::Cell>,
β: Self::Cell,
) -> Self::Cellwhere
Self: Sized,
fn compose_cells2(
&self,
αs: impl IntoIterator<Item = Self::Cell>,
β: Self::Cell,
) -> Self::Cellwhere
Self: Sized,
Composes a two-layer pasting of cells.