UnionFind<T> class

Union-Find data structure for Kruskal's algorithm

Constructors

UnionFind.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connected(T vertex1, T vertex2) bool
Check if two vertices are in the same set
find(T vertex) → T
Find the root of a vertex with path compression
makeSet(T vertex) → void
Make set for a vertex
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
union(T vertex1, T vertex2) bool
Union two sets by rank

Operators

operator ==(Object other) bool
The equality operator.
inherited