SciPy

This is documentation for an old release of SciPy (version 1.6.2). Read this page in the documentation of the latest stable release (version 1.15.1).

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