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 descendants 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]

[src]

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

[src]

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

[src]

Clear the visit state

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter. Read more

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

[src]

Advance to the next item

Important traits for WalkerIter<W, C>
[src]

Create an iterator out of the walker and given context.