pub struct DblTree<E, ProE, Sq>(pub OpenTree<ProE, DblNode<E, Sq>>);
Expand description
A double tree, or pasting diagram in a virtual double category.
The underlying data structure of a double tree is a open tree whose nodes represent cells (or occasionally arrows) in the pasting diagram. Not just any tree constitutes a valid pasting. The domains/codomains and sources/targets of the cells must compatible, and spines can only appear in certain configurations.
Tuple Fields§
§0: OpenTree<ProE, DblNode<E, Sq>>
Implementations§
Source§impl<E, ProE, Sq> DblTree<E, ProE, Sq>
impl<E, ProE, Sq> DblTree<E, ProE, Sq>
Sourcepub fn single(
sq: Sq,
graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>,
) -> Self
pub fn single( sq: Sq, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>, ) -> Self
Constructs a double tree with a single square from a virtual double graph.
Sourcepub fn two_level(
squares: impl IntoIterator<Item = Sq>,
base: Sq,
graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>,
) -> Self
pub fn two_level( squares: impl IntoIterator<Item = Sq>, base: Sq, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>, ) -> Self
Constructs a double tree of height two.
Sourcepub fn dom<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, ProE>where
ProE: Clone,
pub fn dom<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, ProE>where
ProE: Clone,
Domain of the tree in the given virtual double graph.
Sourcepub fn cod(&self, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>) -> ProEwhere
ProE: Clone,
pub fn cod(&self, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>) -> ProEwhere
ProE: Clone,
Codomain of the tree in the given virtual double graph.
Sourcepub fn src<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, E>where
E: Clone,
pub fn src<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, E>where
E: Clone,
Source of the tree in the given virtual double graph.
Sourcepub fn tgt<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, E>where
E: Clone,
pub fn tgt<V>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, E>where
E: Clone,
Target of the tree in the given virtual double graph.
Sourcepub fn arity(
&self,
graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>,
) -> usize
pub fn arity( &self, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>, ) -> usize
Arity of the cell specified by the double tree.
Note that this arity can differ from the arity of the underlying open tree due to the possibility of spines.
Sourcepub fn contained_in(
&self,
graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>,
) -> bool
pub fn contained_in( &self, graph: &impl VDblGraph<E = E, ProE = ProE, Sq = Sq>, ) -> bool
Is the double tree contained in the given virtual double graph?
This includes checking whether the double tree is well-typed, i.e., that the domains and codomains, and sources and targets, of the cells are compatible.
Sourcepub fn is_isomorphic_to(&self, other: &Self) -> bool
pub fn is_isomorphic_to(&self, other: &Self) -> bool
Is the double tree isomorphic to another?
This method simply checks whether the underlying open trees are isomorphic.
Trait Implementations§
impl<E: Eq, ProE: Eq, Sq: Eq> Eq for DblTree<E, ProE, Sq>
impl<E, ProE, Sq> StructuralPartialEq for DblTree<E, ProE, Sq>
Auto Trait Implementations§
impl<E, ProE, Sq> Freeze for DblTree<E, ProE, Sq>where
ProE: Freeze,
impl<E, ProE, Sq> RefUnwindSafe for DblTree<E, ProE, Sq>
impl<E, ProE, Sq> Send for DblTree<E, ProE, Sq>
impl<E, ProE, Sq> Sync for DblTree<E, ProE, Sq>
impl<E, ProE, Sq> Unpin for DblTree<E, ProE, Sq>
impl<E, ProE, Sq> UnwindSafe for DblTree<E, ProE, Sq>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.