Table of Contents

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 IDigraph

The 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

int

Methods

GetConnectedComponentId(int)

Gets the connected component ID of a vertex.

public int GetConnectedComponentId(int vertex)

Parameters

vertex int

The vertex to get the connected component ID of.

Returns

int

StronglyConnected(int, int)

Checks whether two vertices are strongly connected.

public bool StronglyConnected(int vertex1, int vertex2)

Parameters

vertex1 int
vertex2 int

Returns

bool