|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.graph.alg.AbstractGraphAlg
net.sourceforge.combean.graph.alg.spath.CycleInPredMapByDoubleTraversalDetectionAlg
public class CycleInPredMapByDoubleTraversalDetectionAlg
Identify cycles in a predecessor map with a two pass algorithm. In the first pass a node in a cycle is identified (if such a node exists) and in a second pass the cycle is constructed.
| Constructor Summary | |
|---|---|
CycleInPredMapByDoubleTraversalDetectionAlg()
constructor |
|
| Method Summary | |
|---|---|
boolean |
cycleFound()
Check whether a cycle has been found (must be called after run()). |
FixedPath |
getCycle()
Retrieve the cycle that has been found. |
void |
run()
Execute the algorithm. |
void |
setPathForCycle(Path p)
Optional. |
void |
setPredMap(FixedNodeMap predMap)
The predecessor map defining the graph where the cycle shall be found. |
void |
setSingleStartNode(Node startNode)
Search for cycles starting from a single start node. |
| Methods inherited from class net.sourceforge.combean.graph.alg.AbstractGraphAlg |
|---|
getGraph, setGraph |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm |
|---|
getGraph, setGraph |
| Constructor Detail |
|---|
public CycleInPredMapByDoubleTraversalDetectionAlg()
| Method Detail |
|---|
public void setPredMap(FixedNodeMap predMap)
CycleInPredMapDetectionAlg
setPredMap in interface CycleInPredMapDetectionAlgpredMap - a node map which contains the predecessor of every node
(or null of a node has no predecessor)public void setSingleStartNode(Node startNode)
CycleInPredMapDetectionAlg
setSingleStartNode in interface CycleInPredMapDetectionAlgstartNode - the node where the search for cycles shall be startedpublic void setPathForCycle(Path p)
CycleInPredMapDetectionAlg
setPathForCycle in interface CycleInPredMapDetectionAlgp - the path where the cycle shall be storedpublic void run()
GraphAlgorithm
run in interface GraphAlgorithmpublic boolean cycleFound()
CycleInPredMapDetectionAlg
cycleFound in interface CycleInPredMapDetectionAlgpublic FixedPath getCycle()
CycleInPredMapDetectionAlg
getCycle in interface CycleInPredMapDetectionAlg
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||