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

Method add_edge

src/graph/mst/ew_graph.rs:34–39  ·  view source on GitHub ↗
(&mut self, v: usize, w: usize, weight: f32)

Source from the content-addressed store, hash-verified

32 }
33
34 fn add_edge(&mut self, v: usize, w: usize, weight: f32) {
35 let e = Edge::new(v, w, weight);
36 self.adj[v].push_front(e);
37 self.adj[w].push_front(e);
38 self.ne += 1;
39 }
40
41 fn adj(&self, v: usize) -> Iter<'_, Edge> {
42 self.adj[v].iter()

Callers 1

fromMethod · 0.45

Calls 1

push_frontMethod · 0.80

Tested by

no test coverage detected