|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmocgraph.analysis.strategy.Strategy
mocgraph.analysis.strategy.CachedStrategy
mocgraph.analysis.strategy.FloydWarshallZeroLengthCycleStrategy
public class FloydWarshallZeroLengthCycleStrategy
Analyzer to check if a given directed graph has a zero cycle using the Floyd-Warshall all pair shortest path algorithm.
graph.analysis.ZeroLengthCycleAnalysis
Constructor Summary | |
---|---|
FloydWarshallZeroLengthCycleStrategy(Graph graph,
ToDoubleMapping edgeLengths)
Constructs negative cycle detection analyzer for a given graph and given edge values. |
Method Summary | |
---|---|
protected java.lang.Object |
_compute()
The computation associated with the Floyd-Warshall algorithm. |
boolean |
hasNegativeLengthCycle()
Return true if a zero length cycle exists in the graph under analysis. |
java.lang.String |
toString()
Return a description of the analyzer. |
boolean |
valid()
Check for compatibility between the analysis and the given graph. |
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 FloydWarshallZeroLengthCycleStrategy(Graph graph, ToDoubleMapping edgeLengths)
graph
- The given graph.edgeLengths
- The lengths associated with the given graph.Method Detail |
---|
public boolean hasNegativeLengthCycle()
hasNegativeLengthCycle
in interface NegativeLengthCycleAnalyzer
public java.lang.String toString()
toString
in interface Analyzer
toString
in class CachedStrategy
public boolean valid()
valid
in interface Analyzer
protected java.lang.Object _compute()
_compute
in class CachedStrategy
Boolean
Object
if the graph has
a negative cycle.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |