Trait IterDepthFirst

Source
pub trait IterDepthFirst<'a, G: GraphInterface> {
    // Required methods
    fn iter_depth_first(&'a self, start: NodeID) -> DepthFirstSearch<'a, G> ;
    fn connected_components(&'a self) -> Vec<HashSet<NodeID>>;
}
Expand description

Under development

Required Methods§

Source

fn iter_depth_first(&'a self, start: NodeID) -> DepthFirstSearch<'a, G>

Returns a depth first search iterator starting from a given node

Source

fn connected_components(&'a self) -> Vec<HashSet<NodeID>>

Returns a vector of sets of node IDs, where each set is a connected component.
Starts a DFS at every node (except if it’s already been visited) and marks all reachable nodes as being part of the same component.

Implementors§

Source§

impl<'a, G: GraphInterface> IterDepthFirst<'a, G> for G