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

Method new

src/graph/undirected/dfs2.rs:16–22  ·  view source on GitHub ↗
(graph: &dyn IGraph, s: usize)

Source from the content-addressed store, hash-verified

14
15impl NonRecursiveDFS {
16 pub fn new(graph: &dyn IGraph, s: usize) -> Self {
17 let mut dfs = Self {
18 marked: vec![false; graph.V()],
19 };
20 dfs.mark(graph, s);
21 dfs
22 }
23
24 pub fn marked(&self, v: usize) -> bool {
25 self.marked[v]

Callers

nothing calls this directly

Calls 1

markMethod · 0.80

Tested by

no test coverage detected