Show / Hide Table of Contents

Interface IReadOnlyDisjointSet

Read-only representation of DisjointSet.

Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public interface IReadOnlyDisjointSet

Properties

View Source

Count

Number of distinct sets.

Declaration
int Count { get; }
Property Value
Type Description
int

Methods

View Source

Find(int)

Returns the ID for the parent of the set containing the set with ID objectID, performing path compression as search is completed.

Declaration
int Find(int objectID)
Parameters
Type Name Description
int objectID

ID of the object to search for.

Returns
Type Description
int

The ID for the parent of the object given.

View Source

InSameSet(int, int)

Returns true if the objects specified by the given IDs are in the same set.

Declaration
bool InSameSet(int objectID1, int objectID2)
Parameters
Type Name Description
int objectID1
int objectID2
Returns
Type Description
bool

True if the the objects specified by the given IDs are in the same set, false otherwise.

Events

View Source

SetsJoined

Fired when two sets are joined into one. The arguments give the IDs of the two sets that were joined.

Declaration
event EventHandler<JoinedEventArgs>? SetsJoined
Event Type
Type Description
EventHandler<JoinedEventArgs>

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX