Skip to main content

weakly_connected_components

docs-source

Abstract#

The first analysis that is most often run on a graph is usually a search for disconnected components. The algorithm implemented within this module does exactly that, it searches for different components of the graph. Within components, nodes have connections toward each other, while between components there is no edge that connects nodes from separate components.

TraitValue
Module typealgorithm
ImplementationC++
Graph directionundirected
Edge weightsunweighted
Parallelismsequential

Procedures#

get()#

Output:#

  • node ➡ Vertex object with all properties which is going to be related to the component ID it belongs.
  • component_id ➡ Component ID for each node in the graph. Components are zero-indexed and there is no rule of how they will be appointed to node. The only guarantee is that divided components will have distinct component IDs.

Usage:#

CALL weakly_connected_components.get()YIELD node, component_id;

Example#