Package org.jgrapht.alg.interfaces
Interface StrongConnectivityAlgorithm<V,E>
-
- Type Parameters:
V- vertex concept typeE- edge concept type
- All Known Implementing Classes:
GabowStrongConnectivityInspector,KosarajuStrongConnectivityInspector
public interface StrongConnectivityAlgorithm<V,E>An interface to the StrongConnectivityInspector algorithm classes. These classes verify whether the graph is strongly connected.- Since:
- September, 2013
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DirectedGraph<V,E>getGraph()Returns the graph inspected by the StrongConnectivityAlgorithm.booleanisStronglyConnected()Returns true if the graph of thisStrongConnectivityAlgorithminstance is strongly connected.java.util.List<java.util.Set<V>>stronglyConnectedSets()Computes aListofSets, where each set contains vertices which together form a strongly connected component within the given graph.java.util.List<DirectedSubgraph<V,E>>stronglyConnectedSubgraphs()Computes a list ofDirectedSubgraphs of the given graph.
-
-
-
Method Detail
-
getGraph
DirectedGraph<V,E> getGraph()
Returns the graph inspected by the StrongConnectivityAlgorithm.- Returns:
- the graph inspected by this StrongConnectivityAlgorithm
-
isStronglyConnected
boolean isStronglyConnected()
Returns true if the graph of thisStrongConnectivityAlgorithminstance is strongly connected.- Returns:
- true if the graph is strongly connected, false otherwise
-
stronglyConnectedSets
java.util.List<java.util.Set<V>> stronglyConnectedSets()
Computes aListofSets, where each set contains vertices which together form a strongly connected component within the given graph.- Returns:
ListofSets containing the strongly connected components
-
stronglyConnectedSubgraphs
java.util.List<DirectedSubgraph<V,E>> stronglyConnectedSubgraphs()
Computes a list of
DirectedSubgraphs of the given graph. Each subgraph will represent a strongly connected component and will contain all vertices of that component. The subgraph will have an edge (u,v) iff u and v are contained in the strongly connected component.- Returns:
- a list of subgraphs representing the strongly connected components
-
-