Struct stack_graphs::paths::Paths [−][src]
pub struct Paths { /* fields omitted */ }
Expand description
Manages the state of a collection of paths built up as part of the path-finding algorithm.
Implementations
pub fn find_all_paths<I, F>(
&mut self,
graph: &StackGraph,
starting_nodes: I,
visit: F
) where
I: IntoIterator<Item = Handle<Node>>,
F: FnMut(&StackGraph, &mut Paths, Path),
pub fn find_all_paths<I, F>(
&mut self,
graph: &StackGraph,
starting_nodes: I,
visit: F
) where
I: IntoIterator<Item = Handle<Node>>,
F: FnMut(&StackGraph, &mut Paths, Path),
Finds all paths reachable from a set of starting nodes, calling the visit
closure for
each one.
This function will not return until all reachable paths have been processed, so graph
must already contain a complete stack graph. If you have a very large stack graph stored
in some other storage system, and want more control over lazily loading only the necessary
pieces, then you should code up your own loop that calls Path::extend
manually.
Removes any paths that are shadowed by any other path, according to the precedence values of the edges in the paths.