|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.graph.analysis.strategy.Strategy
ptolemy.graph.analysis.strategy.CachedStrategy
ptolemy.graph.analysis.strategy.ParhiMaximumProfitToCostRatioStrategy
public class ParhiMaximumProfitToCostRatioStrategy
Maximum profit to cost ratio analyzer which uses Parhi's algorithm for iteration bound.
For details about the algorithm, please refer to:
K. Ito and K. K. Parhi. Determining the minimum iteration period of an algorithm. Journal of VLSI Signal Processing, 11(3):229-244, December 1995
MaximumProfitToCostRatioAnalysis
Red (ssb) |
Red (shahrooz) |
Field Summary | |
---|---|
private java.util.List |
_delayCycle
|
private java.util.ArrayList |
_delayNodeList
|
private ToIntMapping |
_edgeCosts
|
private ToDoubleMapping |
_edgeProfits
|
private double[][] |
_firstOrderLongestPathMatrix
|
private java.util.ArrayList |
_maximumProfitToCostRatioCycle
|
Constructor Summary | |
---|---|
ParhiMaximumProfitToCostRatioStrategy(Graph graph,
ToDoubleMapping edgeProfits,
ToIntMapping edgeCosts)
Construct an instance of this class. |
Method Summary | |
---|---|
protected java.lang.Object |
_compute()
Perform the graph analysis and return the resulting value. |
private double |
_computeMCM(DirectedGraph graph,
ToDoubleMapping edgeLength)
|
private double[][] |
_makeFirstOrderLongestPathMatrix(java.util.HashMap D,
DirectedGraph graph,
java.util.HashMap predecessorMap)
|
java.util.List |
cycle()
Return the nodes on the cycle that corresponds to the maximum profit to cost ratio. |
double |
maximumRatio()
Return the maximum profit to cost ratio of the given 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 ptolemy.graph.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 ptolemy.graph.analysis.analyzer.GraphAnalyzer |
---|
graph |
Field Detail |
---|
private double[][] _firstOrderLongestPathMatrix
private java.util.List _delayCycle
private java.util.ArrayList _delayNodeList
private java.util.ArrayList _maximumProfitToCostRatioCycle
private ToDoubleMapping _edgeProfits
private ToIntMapping _edgeCosts
Constructor Detail |
---|
public ParhiMaximumProfitToCostRatioStrategy(Graph graph, ToDoubleMapping edgeProfits, ToIntMapping edgeCosts)
graph
- The given graph.edgeProfits
- The profits associated with the edges of the graph.edgeCosts
- The costs associated with the edges of the graph.Method Detail |
---|
public java.util.List cycle()
cycle
in interface MaximumProfitToCostRatioAnalyzer
public double maximumRatio()
maximumRatio
in interface MaximumProfitToCostRatioAnalyzer
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()
CachedStrategy
CachedStrategy.getCachedResult()
provides the result of the
previous invocation of the analysis; this value can be
used, for example, to facilitate incremental analyses.
This method just returns null, and will typically be overridden
in each derived class to perform the appropriate graph analysis.
_compute
in class CachedStrategy
private double _computeMCM(DirectedGraph graph, ToDoubleMapping edgeLength)
private double[][] _makeFirstOrderLongestPathMatrix(java.util.HashMap D, DirectedGraph graph, java.util.HashMap predecessorMap)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |