Interface StrongConnectivityAlgorithm<V,​E>

  • Type Parameters:
    V - vertex concept type
    E - 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 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 this StrongConnectivityAlgorithm instance is strongly connected.
        Returns:
        true if the graph is strongly connected, false otherwise
      • stronglyConnectedSets

        java.util.List<java.util.Set<V>> stronglyConnectedSets()
        Computes a List of Sets, where each set contains vertices which together form a strongly connected component within the given graph.
        Returns:
        List of Set s 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