class documentation
class Partition:
Union-find structure for maintaining disjoint sets.
Class |
|
A representation of a universe of elements organized into disjoint subsets. |
Method | find |
Finds the group containging p and return the position of its leader. |
Method | make |
Makes a new group containing element e, and returns its Position. |
Method | union |
Merges the groups containg elements p and q (if distinct). |
Method | _validate |
Undocumented |