public class ParhiMaximumProfitToCostRatioStrategy extends CachedStrategy implements MaximumProfitToCostRatioAnalyzer
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) |
| Constructor and Description |
|---|
ParhiMaximumProfitToCostRatioStrategy(Graph graph,
ToDoubleMapping edgeProfits,
ToIntMapping edgeCosts)
Construct an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
_compute()
Perform the graph analysis and return the resulting value.
|
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.
|
_convertResult, _result, cachingStatus, disableCaching, enableCaching, getCachedResult, graph, obsolete, reset, setCachedResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgraphpublic 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.public java.util.List cycle()
cycle in interface MaximumProfitToCostRatioAnalyzerpublic double maximumRatio()
maximumRatio in interface MaximumProfitToCostRatioAnalyzerpublic java.lang.String toString()
toString in interface AnalyzertoString in class CachedStrategypublic boolean valid()
protected java.lang.Object _compute()
CachedStrategyCachedStrategy.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