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

Method from

src/graph/shortest/ew_digraph.rs:54–66  ·  view source on GitHub ↗
(nv: usize)

Source from the content-addressed store, hash-verified

52
53impl From<usize> for EWDigraph {
54 fn from(nv: usize) -> Self {
55 let mut adj = Vec::with_capacity(nv);
56 for _ in 0..nv {
57 adj.push(LinkedList::default());
58 }
59
60 Self {
61 nv,
62 ne: 0,
63 adj,
64 in_degree: vec![0; nv],
65 }
66 }
67}
68
69impl From<&str> for EWDigraph {

Callers

nothing calls this directly

Calls 5

pushMethod · 0.80
get_vMethod · 0.80
get_weighted_edgesMethod · 0.80
parseFunction · 0.50
add_edgeMethod · 0.45

Tested by

no test coverage detected