Struct petgraph::visit::DfsPostOrder [] [src]

pub struct DfsPostOrder<N, VM> {
    pub stack: Vec<N>,
    pub discovered: VM,
    pub finished: VM,
}

Visit nodes in a depth-first-search (DFS) emitting nodes in postorder (each node after all its decendants have been emitted).

DfsPostOrder is not recursive.

The traversal starts at a given node and only traverses nodes reachable from it.

Fields

The stack of nodes to visit

The map of discovered nodes

The map of finished nodes

Methods

impl<N, VM> DfsPostOrder<N, VM> where
    N: Copy + PartialEq,
    VM: VisitMap<N>, 
[src]

Create a new DfsPostOrder using the graph's visitor map, and put start in the stack of nodes to visit.

Create a new DfsPostOrder using the graph's visitor map, and no stack.

Clear the visit state

Keep the discovered and finished map, but clear the visit stack and restart the dfs from a particular node.

Return the next node in the traversal, or None if the traversal is done.

Trait Implementations

impl<N: Clone, VM: Clone> Clone for DfsPostOrder<N, VM>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Debug, VM: Debug> Debug for DfsPostOrder<N, VM>
[src]

Formats the value using the given formatter.

impl<G> Walker<G> for DfsPostOrder<G::NodeId, G::Map> where
    G: IntoNeighbors + Visitable
[src]

Advance to the next item

Create an iterator out of the walker and given context.