FindConnectedComponents


Finds connected components in a graph given as set of bidirectional connections.

Syntax

C++
C#
Python
 
def FindConnectedComponents(
	inConnections: list[ list[int] ],
	/
)
-> (
	outComponents: list[ list[int] ],
	outElementLabels: list[int],
	outFound: bool
)

Parameters

Name Type Default Description
Input value inConnections list[ list[int] ] List of connections for each element
Output value outComponents list[ list[int] ] List of input element indices for each connected component
Output value outElementLabels list[int] Index of a component for each input element
Output value outFound bool