Class Kosaraju
- Namespace
- AlgorithmsSW.Digraph
- Assembly
- AlgorithmsSW.dll
Provides an algorithm for finding the strongly connected components of a directed graph.
public class Kosaraju
- Inheritance
-
Kosaraju
- Inherited Members
- Extension Methods
Constructors
Kosaraju(IDigraph)
Initializes a new instance of the Kosaraju class.
public Kosaraju(IDigraph digraph)
Parameters
digraph
IDigraphThe graph to find the strongly connected components of.
Properties
ConnectedComponentCount
Gets the number of strongly connected components in the graph.
public int ConnectedComponentCount { get; }
Property Value
Methods
GetConnectedComponentId(int)
Gets the connected component ID of a vertex.
public int GetConnectedComponentId(int vertex)
Parameters
vertex
intThe vertex to get the connected component ID of.
Returns
StronglyConnected(int, int)
Checks whether two vertices are strongly connected.
public bool StronglyConnected(int vertex1, int vertex2)