Package org.graph4j.connectivity
Interface StrongConnectivityAlgorithm
- All Known Implementing Classes:
TarjanStrongConnectivity
public interface StrongConnectivityAlgorithm
- Author:
- Cristian Frăsinaru
-
Method Summary
Modifier and TypeMethodDescriptionEach strongly connected component is contracted to a single vertex, the resulting graph is a directed acyclic graph, the condensation.static StrongConnectivityAlgorithmgetInstance(Digraph digraph) boolean
-
Method Details
-
isStronglyConnected
boolean isStronglyConnected()- Returns:
trueif the digraph is strongly connected.
-
getStronglyConnectedSets
- Returns:
- a list of vertex sets, each representing the vertices of a strongly connected component.
-
getStronglyConnectedComponents
- Returns:
- a list of digraphs, each representing a strongly connected component.
-
createCondensation
Each strongly connected component is contracted to a single vertex, the resulting graph is a directed acyclic graph, the condensation. Each vertex of the condensation is labeled with the corresponding strongly connected component. Each edge vu of the condensation is labeled with the number of edges from the component of v to to the component of u in the original digrpah.- Returns:
- the condensation digraph.
-
getInstance
- Parameters:
digraph- the input digraph.- Returns:
- the default implementation of this interface.
-