DynamicComponent

Trait DynamicComponent 

Source
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§

Source

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.

Source

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.

Source

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.

Source

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.

Implementors§

Source§

impl<'dc, W> DynamicComponent<'dc> for DynamicGraph<W>
where W: WeightType,