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

Method new

src/graph/directed/order.rs:38–48  ·  view source on GitHub ↗
(nv: usize)

Source from the content-addressed store, hash-verified

36
37impl DepthFirstOrders {
38 fn new(nv: usize) -> Self {
39 Self {
40 pre_order: Vec::with_capacity(nv),
41 pre: vec![0; nv],
42 pre_counter: 0,
43 post_order: Vec::with_capacity(nv),
44 post: vec![0; nv],
45 post_counter: 0,
46 marked: vec![false; nv],
47 }
48 }
49
50 /// run DFS in digraph G from vertex v and compute preorder/postorder
51 fn dfs(&mut self, graph: &dyn IGraph, v: usize) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected