| java.lang.Object org.cougaar.planning.ldm.measure.GenericDerivative
GenericDerivative | public class GenericDerivative implements Serializable,Derivative(Code) | | Generic derivative - represents a fraction of any measure over any other, e.g. Volume/Duration
would be equivalent to the current FlowRate class. Could also be other derivates like Volume/Area, etc.
See Also: GenericRate See Also: for the Measure/Duration shorthand that comes up a lot |
Method Summary | |
public Measure | add(Measure toAdd) | public GenericDerivative<N, D> | add(GenericDerivative<N, D> toAdd) | public Measure | apply(UnaryOperator op) | public Measure | apply(BinaryOperator op, Measure other) | public int | compareTo(Object o) | public Measure | computeNumerator(Measure denominator) | final public Duration | divide(Rate toRate) | final public double | divideRate(Rate toRate) | public boolean | equals(Object o) | public Measure | floor(int unit) Does floor of numerator and denominator. | public Measure | floor(int numeratorUnit, int denominatorUnit) | public Measure | getCanonicalDenominator() | public Measure | getCanonicalNumerator() | public int | getCommonUnit() | final public Class | getDenominatorClass() | public int | getMaxUnit() TODO : Not sure what to do here. | public int | getNativeUnit() | public double | getNativeValue() | final public Class | getNumeratorClass() | final public String | getUnitName(int unit) | public double | getValue(int unit1, int unit2) | public double | getValue(int unit) | public int | hashCode() | public Measure | max(Measure other) | public Measure | min(Measure other) | public N | multiply(D other) | public Measure | negate() | protected GenericDerivative<N, D> | newInstance(N numerator, D denominator) | public Measure | scale(double scale) | public Measure | subtract(Measure toSubtract) | public GenericDerivative<N, D> | subtract(GenericDerivative<N, D> toSubtract) | public String | toString() | public Measure | valueOf(double value) This is a rate in the common unit of the numerator, by the denominator. | public Measure | valueOf(double value, int unit) This is a rate in the specified unit of the numerator, by the denominator. |
GenericDerivative | public GenericDerivative()(Code) | | No-arg constructor is only for use by serialization *
|
GenericDerivative | public GenericDerivative(N num, D den)(Code) | | Parameters: num - An instance of numerator Parameters: den - An instance of denominator |
divideRate | final public double divideRate(Rate toRate)(Code) | | |
floor | public Measure floor(int unit)(Code) | | Does floor of numerator and denominator.
May not be what you want
floor value |
floor | public Measure floor(int numeratorUnit, int denominatorUnit)(Code) | | |
getCanonicalDenominator | public Measure getCanonicalDenominator()(Code) | | |
getCanonicalNumerator | public Measure getCanonicalNumerator()(Code) | | |
getCommonUnit | public int getCommonUnit()(Code) | | |
getDenominatorClass | final public Class getDenominatorClass()(Code) | | |
getMaxUnit | public int getMaxUnit()(Code) | | TODO : Not sure what to do here.
|
getNativeUnit | public int getNativeUnit()(Code) | | |
getNativeValue | public double getNativeValue()(Code) | | |
getNumeratorClass | final public Class getNumeratorClass()(Code) | | |
getUnitName | final public String getUnitName(int unit)(Code) | | Parameters: unit - One of the constant units of * |
getValue | public double getValue(int unit1, int unit2)(Code) | | Parameters: unit1 - One of the constant units of Numer Parameters: unit2 - One of the constant units of Denom |
getValue | public double getValue(int unit)(Code) | | |
hashCode | public int hashCode()(Code) | | |
multiply | public N multiply(D other)(Code) | | |
newInstance | protected GenericDerivative<N, D> newInstance(N numerator, D denominator)(Code) | | Only way to make an instance of the object
Parameters: numerator - to use Parameters: denominator - to use new instance of this derivative or subclass |
valueOf | public Measure valueOf(double value)(Code) | | This is a rate in the common unit of the numerator, by the denominator.
So for instance if this rate is 10 gallons/hr, valueOf (5) would be 5 liters/hour,
since liters is Volume's common unit.
Parameters: value - to use for numerator GenericDerivative instance or subclass |
valueOf | public Measure valueOf(double value, int unit)(Code) | | This is a rate in the specified unit of the numerator, by the denominator.
So for instance if this rate is 10 gallons/hr, valueOf (5, Volume.GALLONS)
would be 5 gallons/hour.
Parameters: value - to use for numerator GenericDerivative instance or subclass |
|
|