(v: usize, w: usize, weight: f32)
| 10 | |
| 11 | impl Edge { |
| 12 | pub fn new(v: usize, w: usize, weight: f32) -> Self { |
| 13 | if weight.is_nan() { |
| 14 | panic!("Weight is NaN"); |
| 15 | } |
| 16 | Self { v, w, weight } |
| 17 | } |
| 18 | |
| 19 | pub fn weight(&self) -> f32 { |
| 20 | self.weight |
nothing calls this directly
no outgoing calls
no test coverage detected