Satsuma
a delicious .NET graph library
|
Implementation of the disjoint-set data structure. More...
Public Member Functions | |
void | Clear () |
Reverts the object to its default state. More... | |
DisjointSet () | |
IEnumerable< T > | Elements (DisjointSetSet< T > aSet) |
Returns the elements of a set. More... | |
DisjointSetSet< T > | Union (DisjointSetSet< T > a, DisjointSetSet< T > b) |
Merges two sets and returns the merged set. More... | |
DisjointSetSet< T > | WhereIs (T element) |
Returns the set where the given element belongs. More... | |
Implementation of the disjoint-set data structure.
Definition at line 93 of file DisjointSet.cs.
Satsuma.DisjointSet< T >.DisjointSet | ( | ) |
Definition at line 102 of file DisjointSet.cs.
void Satsuma.DisjointSet< T >.Clear | ( | ) |
Reverts the object to its default state.
Implements Satsuma.IClearable.
Definition at line 110 of file DisjointSet.cs.
IEnumerable<T> Satsuma.DisjointSet< T >.Elements | ( | DisjointSetSet< T > | aSet | ) |
Returns the elements of a set.
Implements Satsuma.IReadOnlyDisjointSet< T >.
Definition at line 158 of file DisjointSet.cs.
DisjointSetSet<T> Satsuma.DisjointSet< T >.Union | ( | DisjointSetSet< T > | a, |
DisjointSetSet< T > | b | ||
) |
Merges two sets and returns the merged set.
Implements Satsuma.IDisjointSet< T >.
Definition at line 143 of file DisjointSet.cs.
DisjointSetSet<T> Satsuma.DisjointSet< T >.WhereIs | ( | T | element | ) |
Returns the set where the given element belongs.
Implements Satsuma.IReadOnlyDisjointSet< T >.
Definition at line 117 of file DisjointSet.cs.