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§

source§

impl<'a, Graph: StaticGraph, NeighborStrategy: TraversalNeighborStrategy<Graph>, Queue: BidirectedQueue<Graph::NodeIndex>> DfsPostOrderTraversal<Graph, NeighborStrategy, Queue>

source

pub fn new(graph: &Graph, start: Graph::NodeIndex) -> Self

Creates a new traversal that operates on the given graph, starting from the given node.

source

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.

source

pub fn reset(&mut self, start: Graph::NodeIndex)

Resets the traversal to start from the given node.

source

pub fn continue_traversal_from(&mut self, start: Graph::NodeIndex)

Resets the traversal to start from the given node without resetting the visited nodes.

source

pub fn next(&mut self, graph: &'a Graph) -> Option<Graph::NodeIndex>

Computes and returns the next node in depth-first search postorder.

source

pub fn rank_of(&self, node: Graph::NodeIndex) -> Option<Graph::NodeIndex>

Returns the rank of a node in depth-first search postorder, or None if the node has not yet been processed completely.

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V