public class FloydWarshallZeroLengthCycleStrategy extends CachedStrategy implements ZeroLengthCycleAnalyzer
ZeroLengthCycleAnalysis
Red (ssb) |
Red (shahrooz) |
Constructor and Description |
---|
FloydWarshallZeroLengthCycleStrategy(Graph graph,
ToDoubleMapping edgeLengths)
Constructs negative cycle detection analyzer for a given graph and
given edge values.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
_compute()
The computation associated with the Floyd-Warshall algorithm.
|
boolean |
hasZeroLengthCycle()
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.
|
_convertResult, _result, cachingStatus, disableCaching, enableCaching, getCachedResult, graph, obsolete, reset, setCachedResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
graph
public FloydWarshallZeroLengthCycleStrategy(Graph graph, ToDoubleMapping edgeLengths)
graph
- The given graph.edgeLengths
- The lengths associated with the given graph.public boolean hasZeroLengthCycle()
hasZeroLengthCycle
in interface ZeroLengthCycleAnalyzer
public java.lang.String toString()
toString
in interface Analyzer
toString
in class CachedStrategy
public boolean valid()
protected java.lang.Object _compute()
_compute
in class CachedStrategy
Boolean
Object
if the graph has
a negative cycle.