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

Method dfs

src/graph/util/paths.rs:96–104  ·  view source on GitHub ↗
(&mut self, g: &dyn IGraph, v: usize)

Source from the content-addressed store, hash-verified

94 }
95
96 fn dfs(&mut self, g: &dyn IGraph, v: usize) {
97 self.marked[v] = true;
98 for &w in g.adj(v) {
99 if !self.marked[w] {
100 self.edge_to[w] = v;
101 self.dfs(g, w);
102 }
103 }
104 }
105}
106
107impl BreadthFirstPaths {

Callers 1

newMethod · 0.45

Calls 1

adjMethod · 0.45

Tested by

no test coverage detected