FRAMES NO FRAMES

Class IlcRelativeDemandCriticalityCalculatorI

Definition file: ilsched/texturei.h
Include file: <ilsched/ilsched.h>

IlcRelativeDemandCriticalityCalculatorI is the implementation class that implements the relative demand texture criticality calculator.

For more information, see Texture Measurements.

See Also:

Constructor and Destructor Summary
public IlcRelativeDemandCriticalityCalculatorI()
Method Summary
public virtual IlcFloatcalculateCriticalityGreaterThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const
public virtual IlcFloatcalculateCriticalityLessThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const
Inherited Methods from IlcTextureCriticalityCalculatorI
calculateCriticalityGreaterThan, calculateCriticalityLessThan
Constructor and Destructor Detail

IlcRelativeDemandCriticalityCalculatorI

public IlcRelativeDemandCriticalityCalculatorI()

This constructor creates an instance of IlcRelativeDemandCriticalityCalculatorI.


Method Detail

calculateCriticalityGreaterThan

public virtual IlcFloat calculateCriticalityGreaterThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const

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.


calculateCriticalityLessThan

public virtual IlcFloat calculateCriticalityLessThan(IlcFloat expectedDemand, IlcFloat constraintVal, IlcFloat expectedVariance) const

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;
 }