Edge weighted graph
| 17 | use crate::ll::linked_list::Iter; |
| 18 | /// Edge weighted graph |
| 19 | pub trait IEWDigraph { |
| 20 | /// number of vertices |
| 21 | #[allow(non_snake_case)] |
| 22 | fn V(&self) -> usize; |
| 23 | |
| 24 | /// number of edges |
| 25 | #[allow(non_snake_case)] |
| 26 | fn E(&self) -> usize; |
| 27 | |
| 28 | /// Adds the directed edge e to this edge-weighted graph |
| 29 | fn add_edge(&mut self, v: usize, w: usize, weight: f32); |
| 30 | |
| 31 | /// Returns the edges incident on vertex v |
| 32 | fn adj(&self, v: usize) -> Iter<'_, DirectedEdge>; |
| 33 | |
| 34 | /// Returns all edges in this edge-weighted graph |
| 35 | fn edges(&self) -> Vec<DirectedEdge>; |
| 36 | |
| 37 | /// Returns the degree of vertex v |
| 38 | fn out_degree(&self, v: usize) -> usize; |
| 39 | |
| 40 | /// Returns the number of directed edges incident to vertex |
| 41 | fn in_degree(&self, v: usize) -> usize; |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected