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

Method dfs

src/graph/directed/search.rs:37–44  ·  view source on GitHub ↗
(&mut self, graph: &dyn IGraph, v: usize)

Source from the content-addressed store, hash-verified

35
36impl DirectedDFS {
37 fn dfs(&mut self, graph: &dyn IGraph, v: usize) {
38 self.marked[v] = true;
39 for &w in graph.adj(v) {
40 if !self.marked[w] {
41 self.dfs(graph, w);
42 }
43 }
44 }
45}

Callers 2

new_singleMethod · 0.45
new_multiMethod · 0.45

Calls 1

adjMethod · 0.45

Tested by

no test coverage detected