SciPy

scipy.cluster.hierarchy.DisjointSet.connected

DisjointSet.connected(self, x, y)[source]

Test whether x and y are in the same subset.

Parameters
x, yhashable object

Elements to test.

Returns
resultbool

True if x and y are in the same set, False otherwise.

Previous topic

scipy.cluster.hierarchy.DisjointSet.merge

Next topic

scipy.cluster.hierarchy.DisjointSet.subset