Connected components
| 19 | |
| 20 | /// Connected components |
| 21 | pub struct CC { |
| 22 | count: usize, // number of connected components |
| 23 | marked: Vec<bool>, // marked[v] = has vertex v been marked? |
| 24 | id: Vec<usize>, // id[v] = id of connected component containing v |
| 25 | size: Vec<usize>, // size[id] = number of vertices in given component |
| 26 | } |
| 27 | |
| 28 | impl CC { |
| 29 | pub fn new(g: &dyn IGraph) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected