|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.lib.graph.DepthFirstAnalysis
public class DepthFirstAnalysis
Performs a depth-first analysis of a given Graph
, caching
information about the graph's nodes and edges. See the DFS algorithm
in the book 'Introduction to Algorithms' by Cormen, Leiserson, and
Rivest. The algorithm has been modified to group sibling nodes without
connections together during the topological sort.
Constructor Summary | |
---|---|
DepthFirstAnalysis(Graph graph)
Constructor. |
Method Summary | |
---|---|
Collection |
getEdges(int type)
Return all edges of the given type. |
int |
getFinishedTime(Object node)
Return the logical time that the given node was finished in the graph walk, or -1 if the node is not part of the graph. |
List |
getSortedNodes()
Return the nodes in topologically-sorted order. |
boolean |
hasNoCycles()
Test, if the analysis didn't find cycles. |
void |
setNodeComparator(Comparator comp)
Set the comparator that should be used for ordering groups of nodes with the same dependencies. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DepthFirstAnalysis(Graph graph)
Method Detail |
---|
public void setNodeComparator(Comparator comp)
public List getSortedNodes()
public Collection getEdges(int type)
Edge.TYPE_BACK
or Edge.TYPE_FORWARD
edge type.
public int getFinishedTime(Object node)
public boolean hasNoCycles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.