logo
pub struct Ring<B> where
    B: Reborrow,
    B::Target: AsStorage<Arc<<B as Parametric>::Data>> + Consistent + Parametric, 
{ /* private fields */ }
Expand description

Closed path formed by adjacent arcs.

Rings are closed paths formed by arcs and their immediately adjacent arcs. In a consistent graph, every arc forms such a path. Such paths may or may not be occupied by faces.

Rings are notated by their path. A ring with a perimeter formed by vertices $A$, $B$, and $C$ is notated $\overrightarrow{\{A,B,C\}}$. Note that rotations of the set of vertices are equivalent, such as $\overrightarrow{\{B,C,A\}}$.

Implementations

Converts the ring into its leading arc.

Gets the leading arc of the ring.

Gets the shortest logical metric between vertices within the ring.

The logical metric assigns the unit weight (one) to every arc and effectively counts the number of arcs between vertices. In a closed path like a ring, there are two sub-paths between any two vertices. This function computes the metric of the shortest sub-path. This may be the null path with a zero metric.

Converts the ring into its face.

If the path has no associated face, then None is returned.

Gets the face of the ring.

If the path has no associated face, then None is returned.

Gets an iterator of views over the arcs within the ring.

Gets an iterator of views over the vertices within the ring.

Gets an iterator of orphan views over the arcs in the ring.

Gets an iterator of views over the vertices within the ring.

Gets the face of the ring or inserts a face if one does not already exist.

Returns the existing or inserted face.

Gets the face of the ring or inserts a face if one does not already exist.

If a face is inserted, then the given function is used to get the data for the face.

Returns the existing or inserted face.

Trait Implementations

Gets the arity of the ring. This is the number of arcs that form the path.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.