pub trait DynamicComponent<'a, Ix = DefaultIndexType>where
Ix: IndexType,{
// Required methods
fn component_vertices(
&'a self,
v: VertexIndex<Ix>,
) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>;
fn components(&'a self) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>;
fn component_edges(
&'a self,
v: VertexIndex<Ix>,
) -> Box<dyn Iterator<Item = Edge> + 'a>;
fn disconnect_component(&mut self, v: VertexIndex<Ix>) -> Vec<Edge>;
}
Expand description
This trait defines the fundamental operations of a dynamic graph, that can be applied to a connected sub-graph, that is, the connected components of the graph.
Required Methods§
Sourcefn component_vertices(
&'a self,
v: VertexIndex<Ix>,
) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>
fn component_vertices( &'a self, v: VertexIndex<Ix>, ) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>
Returns a boxed iterator over the indices of the vertices which are connected to the
vertex indexed by v
.
Sourcefn components(&'a self) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>
fn components(&'a self) -> Box<dyn Iterator<Item = VertexIndex<Ix>> + 'a>
Returns a boxed iterator over vertices that are representatives of connected components. This implies that no vertices returned by this iterator are connected to each other.
Sourcefn component_edges(
&'a self,
v: VertexIndex<Ix>,
) -> Box<dyn Iterator<Item = Edge> + 'a>
fn component_edges( &'a self, v: VertexIndex<Ix>, ) -> Box<dyn Iterator<Item = Edge> + 'a>
Returns a boxed iterator over the indices of the edges which connect the component the
vertex indexed by v
is part of.
Sourcefn disconnect_component(&mut self, v: VertexIndex<Ix>) -> Vec<Edge>
fn disconnect_component(&mut self, v: VertexIndex<Ix>) -> Vec<Edge>
Deletes all edges from this graph which connect the component the
vertex indexed by v
is part of.