|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmocgraph.analysis.strategy.CachedStrategy
mapss.dif.graph.BaseTopSortStrategy
mapss.dif.graph.DFSTopSortStrategy
public class DFSTopSortStrategy
A depth-first-search approach for finding a topological sorting order. This class adopts a simple approach to pick the first available source node.
TopSortAnalysis
Constructor Summary | |
---|---|
DFSTopSortStrategy(mocgraph.Graph graph)
Construct a top sorting strategy for a given graph. |
Method Summary | |
---|---|
protected java.lang.Object |
_compute()
Compute a topological sorting order. |
protected mocgraph.Node |
_nextSource(mocgraph.DirectedGraph graph)
Return the next source node in determining the top sort. |
protected void |
_setup()
A preliminary step in computing topological sorting. |
Methods inherited from class mapss.dif.graph.BaseTopSortStrategy |
---|
_validate, directedGraph, topSort, toString, valid |
Methods inherited from class mocgraph.analysis.strategy.CachedStrategy |
---|
_convertResult, _result, cachingStatus, disableCaching, enableCaching, getCachedResult, graph, obsolete, reset, setCachedResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface mocgraph.analysis.analyzer.GraphAnalyzer |
---|
graph |
Constructor Detail |
---|
public DFSTopSortStrategy(mocgraph.Graph graph)
graph
- The given graph.Method Detail |
---|
protected final java.lang.Object _compute()
List
, where the order begins at index 0.
_compute
in class mocgraph.analysis.strategy.CachedStrategy
protected mocgraph.Node _nextSource(mocgraph.DirectedGraph graph)
graph
- The graph to get the next source node.
protected void _setup()
_compute()
. The default action here basically does
nothing and users can define desired actions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |