java.lang.Object
org.jgrapht.alg.TransitiveClosure
Constructs the transitive closure of the input graph.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<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.private int
computeBinaryLog
(int n) Computes floor($\log_2 (n)$) $+ 1$
-
Field Details
-
INSTANCE
Singleton instance.
-
-
Constructor Details
-
TransitiveClosure
private TransitiveClosure()Private Constructor.
-
-
Method Details
-
closeSimpleDirectedGraph
Computes the transitive closure of the given graph.- Type Parameters:
V
- the graph vertex typeE
- the graph edge type- Parameters:
graph
- - Graph to compute transitive closure for.
-
computeBinaryLog
private int computeBinaryLog(int n) Computes floor($\log_2 (n)$) $+ 1$ -
closeDirectedAcyclicGraph
Computes the transitive closure of a directed acyclic graph in $O(nm)$- Type Parameters:
V
- the graph vertex typeE
- the graph edge type- Parameters:
graph
- - Graph to compute transitive closure for.
-