Show / Hide Table of Contents

Interface IReadOnlyDisjointSet<T>

Read-only representation of DisjointSet<T>.

Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public interface IReadOnlyDisjointSet<T>
Type Parameters
Name Description
T

Properties

View Source

Count

Number of distinct sets.

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

Methods

View Source

Find(T)

Returns the parent of the set containing item, performing path compression as search is completed.

Declaration
T Find(T item)
Parameters
Type Name Description
T item

Object to search for.

Returns
Type Description
T

The parent of the object given.

View Source

InSameSet(T, T)

Returns true if the two objects specified are in the same set.

Declaration
bool InSameSet(T item1, T item2)
Parameters
Type Name Description
T item1
T item2
Returns
Type Description
bool

True if the two objects are in the same set, false otherwise.

Events

View Source

SetsJoined

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

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

Extension Methods

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