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.boolean
isStronglyConnected()
Returns true if the graph of thisStrongConnectivityAlgorithm
instance is strongly connected.java.util.List<java.util.Set<V>>
stronglyConnectedSets()
Computes aList
ofSet
s, 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 ofDirectedSubgraph
s 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 thisStrongConnectivityAlgorithm
instance is strongly connected.- Returns:
- true if the graph is strongly connected, false otherwise
-
stronglyConnectedSets
java.util.List<java.util.Set<V>> stronglyConnectedSets()
Computes aList
ofSet
s, where each set contains vertices which together form a strongly connected component within the given graph.- Returns:
List
ofSet
s containing the strongly connected components
-
stronglyConnectedSubgraphs
java.util.List<DirectedSubgraph<V,E>> stronglyConnectedSubgraphs()
Computes a list of
DirectedSubgraph
s 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
-
-