Skip to main content

IterDepthFirst

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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