public final class DFSTBuilder<Node>
extends java.lang.Object
Constructor and Description |
---|
DFSTBuilder(Graph<Node> graph) |
DFSTBuilder(Graph<Node> graph,
Node entryNode) |
DFSTBuilder(OutboundSemiGraph<Node> graph) |
DFSTBuilder(OutboundSemiGraph<Node> graph,
Node entryNode) |
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<Node> |
comparator() |
java.util.Comparator<Node> |
comparator(boolean useNNumber) |
Couple<Node> |
getCircularDependency() |
java.util.Collection<java.util.Collection<Node>> |
getComponents() |
Node |
getNodeByNNumber(int n) |
Node |
getNodeByTNumber(int n) |
TIntArrayList |
getSCCs() |
java.util.List<Node> |
getSortedNodes() |
boolean |
isAcyclic() |
public DFSTBuilder(Graph<Node> graph)
DFSTBuilder(OutboundSemiGraph, Object)
public DFSTBuilder(Graph<Node> graph, Node entryNode)
DFSTBuilder(OutboundSemiGraph, Object)
public DFSTBuilder(OutboundSemiGraph<Node> graph)
DFSTBuilder(OutboundSemiGraph, Object)
public DFSTBuilder(OutboundSemiGraph<Node> graph, Node entryNode)
entryNode
- is a first node for Tarjan's algorithm. Different entry nodes produce different node numbers in topological ordering.
if all nodes of the graph is reachable from the entry node and the entry node doesn't have incoming edges then
passing the entry node could be used for finding "natural" back edges (like a loop back edge)public java.util.Comparator<Node> comparator()
public java.util.Comparator<Node> comparator(boolean useNNumber)
useNNumber
- if true then a node number in topological ordering will be used for comparison
otherwise a node number in scc topological order will be usedpublic boolean isAcyclic()
public Node getNodeByNNumber(int n)
public Node getNodeByTNumber(int n)
public TIntArrayList getSCCs()
getNodeByTNumber(int)
.public java.util.Collection<java.util.Collection<Node>> getComponents()
public java.util.List<Node> getSortedNodes()