|
|||||||||
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.FloydWarshallCycleExistenceStrategy
public class FloydWarshallCycleExistenceStrategy
Computation of cycle existence in directed graphs using an all pair shortest path algorithm based on the Floyd-Warshall algorithm. The complexity of this algorithm is O(N^3), where N is the number of nodes.
graph.analysis.CycleExistenceAnalysis
Constructor Summary | |
---|---|
FloydWarshallCycleExistenceStrategy(Graph graph)
Construct an instance of this analyzer for a given graph. |
Method Summary | |
---|---|
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. |
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 FloydWarshallCycleExistenceStrategy(Graph graph)
graph
- The given graph.Method Detail |
---|
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.
valid
in interface Analyzer
protected java.lang.Object _compute()
_compute
in class CachedStrategy
Boolean
Object
if the graph is
cyclic.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |