Show / Hide Table of Contents

Interface IDisjointSet<T>

A disjoint-set data structure.

Namespace: QuikGraph.Collections
Assembly: QuikGraph.dll
Syntax
public interface IDisjointSet<T>
Type Parameters
Name Description
T

Element type.

Properties

| Improve this Doc View Source

ElementCount

Gets the current number of elements.

Declaration
int ElementCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

SetCount

Gets the current number of sets.

Declaration
int SetCount { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AreInSameSet(T, T)

Gets a value indicating if left and right are contained in the same set.

Declaration
bool AreInSameSet(T left, T right)
Parameters
Type Name Description
T left

Left value.

T right

Right value.

Returns
Type Description
System.Boolean

True if both values are in the same set, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

left is null.

System.ArgumentNullException

right is null.

| Improve this Doc View Source

Contains(T)

Gets a value indicating whether the value is in the data structure.

Declaration
bool Contains(T value)
Parameters
Type Name Description
T value

The value.

Returns
Type Description
System.Boolean

True if the value is already in the set, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

value is null.

| Improve this Doc View Source

FindSet(T)

Finds the set containing the value.

Declaration
T FindSet(T value)
Parameters
Type Name Description
T value

Value to search.

Returns
Type Description
T

Root value of the set.

Exceptions
Type Condition
System.ArgumentNullException

value is null.

| Improve this Doc View Source

MakeSet(T)

Creates a new set for the value.

Declaration
void MakeSet(T value)
Parameters
Type Name Description
T value

The value.

Exceptions
Type Condition
System.ArgumentNullException

value is null.

| Improve this Doc View Source

Union(T, T)

Merges the sets from the two values.

Declaration
bool Union(T left, T right)
Parameters
Type Name Description
T left

Left value.

T right

Right value.

Returns
Type Description
System.Boolean

True if left and right were unioned, false if they already belong to the same set.

Exceptions
Type Condition
System.ArgumentNullException

left is null.

System.ArgumentNullException

right is null.

Extension Methods

GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, XmlReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, String, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String, Action<XmlWriter, TGraph>, Action<XmlWriter, TVertex>, Action<XmlWriter, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph