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
TVertexThe original vertex type.
- Inheritance
-
CondensationResult<TVertex>
- Inherited Members
Properties
ComponentCount
Gets the number of strongly connected components.
public int ComponentCount { get; }
Property Value
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
vertexTVertexAn original graph vertex.
Returns
- int
The zero-based component index.
Exceptions
- ArgumentException
vertexwas not part of the condensed graph.
Members(int)
Gets the original vertices inside component componentIndex.
public IReadOnlySet<TVertex> Members(int componentIndex)
Parameters
componentIndexintThe zero-based component index.
Returns
- IReadOnlySet<TVertex>
The component's vertex set.
Exceptions
- ArgumentOutOfRangeException
componentIndexis out of range.