Table of Contents

Class CondensationResult<TVertex>

Namespace
Graph1x.Algorithms
Assembly
Graph1x.dll

The condensation of a directed graph: every strongly connected component collapsed into one integer vertex, yielding a DAG. Component indexes follow Tarjan's reverse-topological emission order, so every condensation edge points from a higher index to a lower one.

public sealed class CondensationResult<TVertex> where TVertex : notnull

Type Parameters

TVertex

The original vertex type.

Inheritance
CondensationResult<TVertex>
Inherited Members

Properties

ComponentCount

Gets the number of strongly connected components.

public int ComponentCount { get; }

Property Value

int

Graph

Gets the condensation DAG over component indexes.

public IDirectedGraph<int, Edge<int>> Graph { get; }

Property Value

IDirectedGraph<int, Edge<int>>

Methods

ComponentOf(TVertex)

Gets the component index containing vertex.

public int ComponentOf(TVertex vertex)

Parameters

vertex TVertex

An original graph vertex.

Returns

int

The zero-based component index.

Exceptions

ArgumentException

vertex was not part of the condensed graph.

Members(int)

Gets the original vertices inside component componentIndex.

public IReadOnlySet<TVertex> Members(int componentIndex)

Parameters

componentIndex int

The zero-based component index.

Returns

IReadOnlySet<TVertex>

The component's vertex set.

Exceptions

ArgumentOutOfRangeException

componentIndex is out of range.