Struct petgraph::visit::SubTopo [] [src]

pub struct SubTopo<N, VM> {
    // some fields omitted
}

A topological order traversal for a subgraph.

SubTopo starts at a node, and does a topological order traversal of all nodes reachable from the starting point.

Methods

impl<N, VM> SubTopo<N, VM> where N: Clone, VM: VisitMap<N>
[src]

fn from_node<'a, G>(graph: &'a G, node: N) -> Self where G: Externals<'a> + Visitable<NodeId=N, Map=VM>

Create a new SubTopo, using the graph's visitor map, and put single node in the to-visit list.

fn reset_with_node<'a, G>(&mut self, graph: &'a G, node: N) where G: Revisitable<NodeId=N, Map=VM>

Clear visited state, and put a single node into the visit list.

fn next<'a, G>(&mut self, g: &'a G) -> Option<N> where G: NeighborsDirected<'a> + Visitable<NodeId=N, Map=VM>

Return the next node in the current topological order traversal, or None if the traversal is at the end.

Note: The subgraph may not have a complete topological order. If there is a cycle in the subgraph, then nodes of that cycle are included in this traversal.

Trait Implementations

Derived Implementations

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

fn clone(&self) -> SubTopo<N, VM>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more