MCPcopy Create free account
hub / github.com/douchuan/algorithm / Paths

Interface Paths

src/graph/util/paths.rs:9–14  ·  view source on GitHub ↗

Finding paths Given a graph and a source vertex s, support queries of the form: Is there a path from s to a given target vertex v? If so, find such a path.

Source from the content-addressed store, hash-verified

7/// of the form: Is there a path from s to a given target
8/// vertex v? If so, find such a path.
9pub trait Paths {
10 /// is there a path from s to v ?
11 fn has_path(&self, v: usize) -> bool;
12 /// path from s to v; None if no such path
13 fn path_to(&self, v: usize) -> Option<LinkedList<usize>>;
14}
15
16/// Run depth-first search on an undirected graph.
17///

Callers

nothing calls this directly

Implementers 1

paths.rssrc/graph/util/paths.rs

Calls

no outgoing calls

Tested by

no test coverage detected