Function petgraph::algo::all_simple_paths [−][src]
pub fn all_simple_paths<TargetColl, G>(
graph: G,
from: G::NodeId,
to: G::NodeId,
min_intermediate_nodes: usize,
max_intermediate_nodes: Option<usize>
) -> impl Iterator<Item = TargetColl> where
G: NodeCount,
G: IntoNeighborsDirected,
G::NodeId: Eq + Hash,
TargetColl: FromIterator<G::NodeId>,
Returns iterator that produces all simple paths from from
node to to
, which contains at least min_intermediate_nodes
nodes
and at most max_intermediate_nodes
, if given, limited by graph’s order otherwise
Simple path is path without repetitions
Algorithm is adopted from https://networkx.github.io/documentation/stable/reference/algorithms/generated/networkx.algorithms.simple_paths.all_simple_paths.html