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

Interface IEWGraph

src/graph/mst/mod.rs:53–73  ·  view source on GitHub ↗

Edge weighted graph

Source from the content-addressed store, hash-verified

51
52/// Edge weighted graph
53pub trait IEWGraph {
54 /// number of vertices
55 #[allow(non_snake_case)]
56 fn V(&self) -> usize;
57
58 /// number of edges
59 #[allow(non_snake_case)]
60 fn E(&self) -> usize;
61
62 /// Adds the undirected edge e to this edge-weighted graph
63 fn add_edge(&mut self, v: usize, w: usize, weight: f32);
64
65 /// Returns the edges incident on vertex v
66 fn adj(&self, v: usize) -> Iter<'_, Edge>;
67
68 /// Returns all edges in this edge-weighted graph
69 fn edges(&self) -> Vec<Edge>;
70
71 /// Returns the degree of vertex v
72 fn degree(&self, v: usize) -> usize;
73}

Callers

nothing calls this directly

Implementers 1

ew_graph.rssrc/graph/mst/ew_graph.rs

Calls

no outgoing calls

Tested by

no test coverage detected