Interface StrongConnectivityAlgorithm

All Known Implementing Classes:
TarjanStrongConnectivity

public interface StrongConnectivityAlgorithm
Author:
Cristian Frăsinaru
  • Method Details

    • isStronglyConnected

      boolean isStronglyConnected()
      Returns:
      true if the digraph is strongly connected.
    • getStronglyConnectedSets

      List<VertexSet> getStronglyConnectedSets()
      Returns:
      a list of vertex sets, each representing the vertices of a strongly connected component.
    • getStronglyConnectedComponents

      List<Digraph> getStronglyConnectedComponents()
      Returns:
      a list of digraphs, each representing a strongly connected component.
    • createCondensation

      Digraph<Digraph,Integer> 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

      static StrongConnectivityAlgorithm getInstance(Digraph digraph)
      Parameters:
      digraph - the input digraph.
      Returns:
      the default implementation of this interface.