public class FloydWarshallCycleExistenceStrategy extends CachedStrategy implements CycleExistenceAnalyzer
CycleExistenceAnalysis
Constructor and Description |
---|
FloydWarshallCycleExistenceStrategy(Graph graph)
Construct an instance of this analyzer for a given graph.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
_compute()
The computation associated with the Floyd-Warshall algorithm.
|
boolean |
hasCycle()
Check acyclic property of the graph.
|
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 FloydWarshallCycleExistenceStrategy(Graph graph)
graph
- The given graph.public boolean hasCycle()
hasCycle
in interface CycleExistenceAnalyzer
public java.lang.String toString()
toString
in interface Analyzer
toString
in class CachedStrategy
public boolean valid()
DirectedGraph
in order to use this algorithm.protected java.lang.Object _compute()
_compute
in class CachedStrategy
Boolean
Object
if the graph is
cyclic.