WCC (SmallWorld Optimized)
In addition to the regular weakly connected component algorithm, we also provide a version that is optimized for smallworld graphs. A small world graph means the graph has a hub community, where the vast majority of the vertices in the graph are weakly connected.
This version improves upon the performance of the original algorithm when dealing with smallworld graphs by combining several different methods used to find connected components in a multistep process proposed by Slota et al. in BFS and Coloringbased Parallel Algorithms for Strongly Connected Components and Related Problems.
The algorithm starts by selecting an initial pivot vertex v with a high product of indegree and outdegree. From the initial pivot vertex, the algorithm uses BreadthFirst Search to determine the massive weakly connected component. The vertices that are not included in this SCC are passed off to the next step.
After identifying the first WCC, the algorithm uses the coloring method to identify the WCCs in the remaining vertices.
Parameters
Name  Description  Data type 


The vertex type to count as part of a connected component 


The edge type to traverse 


The threshold used to choose initial pivot vertices. Only vertices whose product of indegree and outdegree exceed this threshold will be considered candidates for the pivot vertex. This is an attempt to increase the chances that the initial pivot is contained within the largest WCC. The default value for this parameter is 100000. It is suggested that you keep this default value when running the algorithm. 


If true, the algorithm will return the number of vertices in each connected component. 

Result
If to_show_cc_count
is set to true, the algorithm will return the
number of vertices in each weakly connected component.