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

Method dfs

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

Source from the content-addressed store, hash-verified

48
49impl KosarajuSCC {
50 fn dfs(&mut self, graph: &dyn IGraph, v: usize) {
51 self.marked[v] = true;
52 self.id[v] = self.count;
53 for &w in graph.adj(v) {
54 if !self.marked[w] {
55 self.dfs(graph, w);
56 }
57 }
58 }
59}

Callers 1

newMethod · 0.45

Calls 1

adjMethod · 0.45

Tested by

no test coverage detected