Struct daggy::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>
fn from_node<'a, G>(graph: &'a G, node: N) -> SubTopo<N, VM> where G: Externals<'a, NodeId=N> + Visitable<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<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, NodeId=N> + Visitable<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, VM> Clone for SubTopo<N, VM> where N: Clone, VM: Clone
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