DFSVisitor

Trait DFSVisitor 

Source
pub trait DFSVisitor {
    type Graph: VisitableGraph;
    type Output: Default;

    // Provided methods
    fn init_node(
        &mut self,
        _graph: &Self::Graph,
        _node: &NodeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn start_node(
        &mut self,
        _graph: &Self::Graph,
        _node: &NodeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn discover_node(
        &mut self,
        _graph: &Self::Graph,
        _node: &NodeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn finish_node(
        &mut self,
        _graph: &Self::Graph,
        _node: &NodeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn examine_edge(
        &mut self,
        _graph: &Self::Graph,
        _edge: &EdgeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn tree_edge(
        &mut self,
        _graph: &Self::Graph,
        _edge: &EdgeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn back_edge(
        &mut self,
        _graph: &Self::Graph,
        _edge: &EdgeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn forward_or_cross_edge(
        &mut self,
        _graph: &Self::Graph,
        _edge: &EdgeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn finish_edge(
        &mut self,
        _graph: &Self::Graph,
        _edge: &EdgeID,
    ) -> Result<Option<Self::Output>> { ... }
    fn finish(&mut self, _graph: &Self::Graph) -> Result<Self::Output> { ... }
}
Expand description

A visitor for depth-first search.

Required Associated Types§

Provided Methods§

Source

fn init_node( &mut self, _graph: &Self::Graph, _node: &NodeID, ) -> Result<Option<Self::Output>>

Source

fn start_node( &mut self, _graph: &Self::Graph, _node: &NodeID, ) -> Result<Option<Self::Output>>

Source

fn discover_node( &mut self, _graph: &Self::Graph, _node: &NodeID, ) -> Result<Option<Self::Output>>

Source

fn finish_node( &mut self, _graph: &Self::Graph, _node: &NodeID, ) -> Result<Option<Self::Output>>

Source

fn examine_edge( &mut self, _graph: &Self::Graph, _edge: &EdgeID, ) -> Result<Option<Self::Output>>

Source

fn tree_edge( &mut self, _graph: &Self::Graph, _edge: &EdgeID, ) -> Result<Option<Self::Output>>

Source

fn back_edge( &mut self, _graph: &Self::Graph, _edge: &EdgeID, ) -> Result<Option<Self::Output>>

Source

fn forward_or_cross_edge( &mut self, _graph: &Self::Graph, _edge: &EdgeID, ) -> Result<Option<Self::Output>>

Source

fn finish_edge( &mut self, _graph: &Self::Graph, _edge: &EdgeID, ) -> Result<Option<Self::Output>>

Source

fn finish(&mut self, _graph: &Self::Graph) -> Result<Self::Output>

Implementors§