bundles / scipy latest / scipy / _lib / _disjoint_set / DisjointSet / merge
function
scipy._lib._disjoint_set:DisjointSet.merge
source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_disjoint_set.py:163
Signature
def merge(self, x, y)Summary
Merge the subsets of x and y.
Extended Summary
The smaller subset (the child) is merged into the larger subset (the parent). If the subsets are of equal size, the root element which was first inserted into the disjoint set is selected as the parent.
Parameters
x, y: hashable objectElements to merge.
Returns
merged: boolTrue if
xandywere in disjoint sets, False otherwise.
Aliases
scipy.cluster.hierarchy.DisjointSet.merge