public class TransitiveClosure extends Object
Modifier and Type | Field and Description |
---|---|
static TransitiveClosure |
INSTANCE
Singleton instance.
|
Modifier and Type | Method and 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.
|
public static final TransitiveClosure INSTANCE
public <V,E> void closeSimpleDirectedGraph(SimpleDirectedGraph<V,E> graph)
V
- the graph vertex typeE
- the graph edge typegraph
- - Graph to compute transitive closure for.public <V,E> void closeDirectedAcyclicGraph(DirectedAcyclicGraph<V,E> graph)
V
- the graph vertex typeE
- the graph edge typegraph
- - Graph to compute transitive closure for.Copyright © 2018. All rights reserved.