Class TransitiveClosure

java.lang.Object
org.jgrapht.alg.TransitiveClosure

public class TransitiveClosure
extends java.lang.Object
Constructs the transitive closure of the input graph.
Author:
Vinayak R. Borkar
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static TransitiveClosure INSTANCE
    Singleton instance.
  • Method Summary

    Modifier and Type Method Description
    <V,​ E> void closeDirectedAcyclicGraph​(DirectedAcyclicGraph<V,​E> graph)
    Computes the transitive closure of a directed acyclic graph in $O(nm)$
    <V,​ E> void closeSimpleDirectedGraph​(SimpleDirectedGraph<V,​E> graph)
    Computes the transitive closure of the given graph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • closeSimpleDirectedGraph

      public <V,​ E> void closeSimpleDirectedGraph​(SimpleDirectedGraph<V,​E> graph)
      Computes the transitive closure of the given graph.
      Type Parameters:
      V - the graph vertex type
      E - the graph edge type
      Parameters:
      graph - - Graph to compute transitive closure for.
    • closeDirectedAcyclicGraph

      public <V,​ E> void closeDirectedAcyclicGraph​(DirectedAcyclicGraph<V,​E> graph)
      Computes the transitive closure of a directed acyclic graph in $O(nm)$
      Type Parameters:
      V - the graph vertex type
      E - the graph edge type
      Parameters:
      graph - - Graph to compute transitive closure for.