In the documentation for graph-tool
vertex percolation process, there is a quantity called comp
defined as
Vertex property map with component labels.
I would like to know whether that refers to the number of connected components (I am interested on that). When I run the simulation for a graph I get an object which returns always the same number.
No, that property map just indicates to which component a vertex belongs (labelled from 0
to C-1
, where C
is the number of components).
To get the number C
of connected components you can just look a the maximum value of that property map and just add one to it.