pub enum DblNode<E, Sq> {
Cell(Sq),
Spine(E),
}
Expand description
A node in a double tree.
More precisely, this is the type of values carried by nodes in a double tree.
Variants§
Cell(Sq)
A generic cell, given by a square in a virtual double graph.
Spine(E)
An edge on the boundary of the double tree.
In a well-formed double tree, each spine node must be a child of a nullary cell or of another spine node. Spines represent the operation of precomposing a nullary cell with an arrow to obtain another nullary cell, a degenerate case of composition in a virtual double category.
Implementations§
Source§impl<E, Sq> DblNode<E, Sq>
impl<E, Sq> DblNode<E, Sq>
Sourcepub fn dom<V, ProE>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, ProE>
pub fn dom<V, ProE>( &self, graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>, ) -> Path<V, ProE>
Domain of node in the given virtual double graph.
Returns a path of arbitrary length.
Sourcepub fn cod<V, ProE>(
&self,
graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>,
) -> Path<V, ProE>
pub fn cod<V, ProE>( &self, graph: &impl VDblGraph<V = V, E = E, ProE = ProE, Sq = Sq>, ) -> Path<V, ProE>
Codomain of node in the given virtual double graph.
Returns a path of length at most one.
Sourcepub fn src(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> Ewhere
E: Clone,
pub fn src(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> Ewhere
E: Clone,
Source of node in the given virtual double graph.
Sourcepub fn tgt(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> Ewhere
E: Clone,
pub fn tgt(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> Ewhere
E: Clone,
Target of node in the given virtual double graph.
Sourcepub fn arity(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> usize
pub fn arity(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> usize
Arity of node in the given virtual double graph.
Sourcepub fn contained_in(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> bool
pub fn contained_in(&self, graph: &impl VDblGraph<E = E, Sq = Sq>) -> bool
Is the node contained in the given virtual double graph?
Trait Implementations§
impl<E: Eq, Sq: Eq> Eq for DblNode<E, Sq>
impl<E, Sq> StructuralPartialEq for DblNode<E, Sq>
Auto Trait Implementations§
impl<E, Sq> Freeze for DblNode<E, Sq>
impl<E, Sq> RefUnwindSafe for DblNode<E, Sq>where
Sq: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, Sq> Send for DblNode<E, Sq>
impl<E, Sq> Sync for DblNode<E, Sq>
impl<E, Sq> Unpin for DblNode<E, Sq>
impl<E, Sq> UnwindSafe for DblNode<E, Sq>where
Sq: UnwindSafe,
E: UnwindSafe,
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.