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

Class CC

src/graph/undirected/cc.rs:21–26  ·  view source on GitHub ↗

Connected components

Source from the content-addressed store, hash-verified

19
20/// Connected components
21pub 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
28impl CC {
29 pub fn new(g: &dyn IGraph) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected