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

Method from

src/graph/mst/ew_graph.rs:73–80  ·  view source on GitHub ↗
(nv: usize)

Source from the content-addressed store, hash-verified

71
72impl From<usize> for EWGraph {
73 fn from(nv: usize) -> Self {
74 let mut adj = Vec::with_capacity(nv);
75 for _ in 0..nv {
76 adj.push(LinkedList::default());
77 }
78
79 Self { nv, ne: 0, adj }
80 }
81}
82
83impl From<&str> for EWGraph {

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