Function petgraph::algo::has_path_connecting
source · [−]pub fn has_path_connecting<G>(
g: G,
from: G::NodeId,
to: G::NodeId,
space: Option<&mut DfsSpace<G::NodeId, G::Map>>
) -> boolwhere
G: IntoNeighbors + Visitable,
Expand description
[Generic] Check if there exists a path starting at from
and reaching to
.
If from
and to
are equal, this function returns true.
If space
is not None
, it is used instead of creating a new workspace for
graph traversal.