(nv: usize)
| 45 | /// create a V-vertex graph with no edges |
| 46 | impl From<usize> for Digraph { |
| 47 | fn from(nv: usize) -> Self { |
| 48 | let mut adj = Vec::with_capacity(nv); |
| 49 | for _ in 0..nv { |
| 50 | adj.push(LinkedList::default()); |
| 51 | } |
| 52 | |
| 53 | Self { nv, ne: 0, adj } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | impl From<&str> for Digraph { |