ptolemy.graph.analysis.strategy
Class FloydWarshallStrategy

java.lang.Object
  extended by ptolemy.graph.analysis.strategy.Strategy
      extended by ptolemy.graph.analysis.strategy.CachedStrategy
          extended by ptolemy.graph.analysis.strategy.FloydWarshallStrategy
All Implemented Interfaces:
Analyzer, GraphAnalyzer
Direct Known Subclasses:
FloydWarshallAllPairShortestPathStrategy, FloydWarshallTransitiveClosureStrategy

public abstract class FloydWarshallStrategy
extends CachedStrategy

Base class for all the analysis based on a floyd-warshall like computation. This is an abstract class and cannot be instantiated.

Since:
Ptolemy II 4.0
Version:
$Id: FloydWarshallStrategy.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Shahrooz Shahparnia
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (shahrooz)

Constructor Summary
FloydWarshallStrategy(Graph graph)
          Construct an FloydWarshallStrategy.
 
Method Summary
protected  java.lang.Object _compute()
          Basic computation performed by all the analysis implementing a floyd-warshall like analysis on a given graph.
protected  void _floydWarshallComputation(int k, int i, int j)
          Derived classed need to override the _floydWarshallComputation method of this class to provide the correct functionality.
 
Methods inherited from class ptolemy.graph.analysis.strategy.CachedStrategy
_convertResult, _result, cachingStatus, disableCaching, enableCaching, getCachedResult, graph, obsolete, reset, setCachedResult, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.Analyzer
valid
 

Constructor Detail

FloydWarshallStrategy

public FloydWarshallStrategy(Graph graph)
Construct an FloydWarshallStrategy.

Parameters:
graph - The given graph.
Method Detail

_compute

protected java.lang.Object _compute()
Basic computation performed by all the analysis implementing a floyd-warshall like analysis on a given graph. Derived classed need to override the (@link #_floydWarshallComputation} method of this class to provide the correct functionality.

Overrides:
_compute in class CachedStrategy
Returns:
The analysis results.

_floydWarshallComputation

protected void _floydWarshallComputation(int k,
                                         int i,
                                         int j)
Derived classed need to override the _floydWarshallComputation method of this class to provide the correct functionality.

Parameters:
k - The counting parameter of the first loop of the Floyd-Warshall computation.
i - The counting parameter of the second loop of the Floyd-Warshall computation.
j - The counting parameter of the third and last loop of the Floyd-Warshall computation.