Interface IReadOnlyDisjointSet
Read-only representation of DisjointSet
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public interface IReadOnlyDisjointSet
Properties
| Improve this Doc View SourceCount
Number of distinct sets.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceFind(Int32)
Returns the parent of the set containing obj
, performing path compression as search is completed.
Declaration
int Find(int obj)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | obj | Object to search for. |
Returns
Type | Description |
---|---|
System.Int32 | The parent of the object given. |
InSameSet(Int32, Int32)
Returns true if the two objects specified are in the same set.
Declaration
bool InSameSet(int obj1, int obj2)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | obj1 | |
System.Int32 | obj2 |
Returns
Type | Description |
---|---|
System.Boolean | True if the two objects are in the same set, false otherwise. |