Overview | Group | Tree | Graph | Index | Concepts |
IlcRelativeDemandCriticalityCalculatorI
is the
implementation class that implements the relative demand texture criticality
calculator.
For more information, see Texture Measurements.
See Also:
IlcResourceTexture, IlcTextureCriticalityCalculatorI, IlcTextureCriticalityCalculator, IlcProbabilisticCriticalityCalculatorI
Constructor and Destructor Summary | |
---|---|
public | IlcRelativeDemandCriticalityCalculatorI() |
Method Summary | |
---|---|
public virtual IlcFloat | calculateCriticalityGreaterThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const |
public virtual IlcFloat | calculateCriticalityLessThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const |
Inherited Methods from IlcTextureCriticalityCalculatorI |
---|
calculateCriticalityGreaterThan, calculateCriticalityLessThan |
Constructor and Destructor Detail |
---|
This constructor creates an instance of
IlcRelativeDemandCriticalityCalculatorI
.
Method Detail |
---|
This method calculates the criticality of a maximum constraint at one
time point based on the ratio of demand
to
constraintVal
. For sample code, see IlcRelativeDemandCriticalityCalculatorI::calculateCriticalityLessThan
.
This method calculates the criticality of a minimum constraint at one
time point based on the ratio of constraintVal
to
demand
.
Example
The two criticality calculation methods may be written as follows:
IlcFloat IlcRelativeDemandCriticalityCalculatorI:: calculateCriticalityGreaterThan(IlcFloat demand, IlcFloat constraintVal, IlcFloat) const { if (demand <= 0) return 0; else if (constraintVal <= 0) return IlcFloatMax; return demand / constraintVal; } IlcFloat IlcRelativeDemandCriticalityCalculatorI:: calculateCriticalityLessThan(IlcFloat demand, IlcFloat constraintVal, IlcFloat = 0.) const { if (constraintVal <= 0) return 0; else if (demand <= 0) return IlcFloatMax; return constraintVal / demand; }