Struct traitgraph_algo::traversal::DfsPostOrderTraversal
source · [−]pub struct DfsPostOrderTraversal<Graph: GraphBase, NeighborStrategy, Queue: BidirectedQueue<Graph::NodeIndex>> { /* private fields */ }
Expand description
A generic depth first postorder graph traversal.
The traversal is generic over the graph implementation,
as well as the direction of the search (NeighborStrategy
)
and the queue implementation (Queue
).
Moreover, the traversal computes the postorder rank of each visited node.
This traversal operates with node-granularity, meaning that the next
method returns nodes.
Implementations
sourceimpl<'a, Graph: StaticGraph, NeighborStrategy: TraversalNeighborStrategy<'a, Graph>, Queue: BidirectedQueue<Graph::NodeIndex>> DfsPostOrderTraversal<Graph, NeighborStrategy, Queue>
impl<'a, Graph: StaticGraph, NeighborStrategy: TraversalNeighborStrategy<'a, Graph>, Queue: BidirectedQueue<Graph::NodeIndex>> DfsPostOrderTraversal<Graph, NeighborStrategy, Queue>
sourcepub fn new(graph: &Graph, start: Graph::NodeIndex) -> Self
pub fn new(graph: &Graph, start: Graph::NodeIndex) -> Self
Creates a new traversal that operates on the given graph, starting from the given node.
sourcepub fn new_without_start(graph: &Graph) -> Self
pub fn new_without_start(graph: &Graph) -> Self
Creates a new traversal that operates on the given graph.
There is no starting node given, and to start the search, one of the reset
methods needs to be used.
sourcepub fn reset(&mut self, start: Graph::NodeIndex)
pub fn reset(&mut self, start: Graph::NodeIndex)
Resets the traversal to start from the given node.
sourcepub fn continue_traversal_from(&mut self, start: Graph::NodeIndex)
pub fn continue_traversal_from(&mut self, start: Graph::NodeIndex)
Resets the traversal to start from the given node without resetting the visited nodes.
Auto Trait Implementations
impl<Graph, NeighborStrategy, Queue> RefUnwindSafe for DfsPostOrderTraversal<Graph, NeighborStrategy, Queue> where
Graph: RefUnwindSafe,
NeighborStrategy: RefUnwindSafe,
Queue: RefUnwindSafe,
<Graph as GraphBase>::NodeIndex: RefUnwindSafe,
<Graph as GraphBase>::OptionalNodeIndex: RefUnwindSafe,
impl<Graph, NeighborStrategy, Queue> Send for DfsPostOrderTraversal<Graph, NeighborStrategy, Queue> where
Graph: Send,
NeighborStrategy: Send,
Queue: Send,
<Graph as GraphBase>::NodeIndex: Send,
<Graph as GraphBase>::OptionalNodeIndex: Send,
impl<Graph, NeighborStrategy, Queue> Sync for DfsPostOrderTraversal<Graph, NeighborStrategy, Queue> where
Graph: Sync,
NeighborStrategy: Sync,
Queue: Sync,
<Graph as GraphBase>::NodeIndex: Sync,
<Graph as GraphBase>::OptionalNodeIndex: Sync,
impl<Graph, NeighborStrategy, Queue> Unpin for DfsPostOrderTraversal<Graph, NeighborStrategy, Queue> where
Graph: Unpin,
NeighborStrategy: Unpin,
Queue: Unpin,
<Graph as GraphBase>::NodeIndex: Unpin,
<Graph as GraphBase>::OptionalNodeIndex: Unpin,
impl<Graph, NeighborStrategy, Queue> UnwindSafe for DfsPostOrderTraversal<Graph, NeighborStrategy, Queue> where
Graph: UnwindSafe,
NeighborStrategy: UnwindSafe,
Queue: UnwindSafe,
<Graph as GraphBase>::NodeIndex: UnwindSafe,
<Graph as GraphBase>::OptionalNodeIndex: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more