![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectimp.core.Value
imp.estimator.Measure
public class Measure
Defines a physical measure.
Field Summary |
---|
Fields inherited from class imp.core.Value |
---|
NULL |
Method Summary | |
---|---|
double |
getBound()
Gets the bound B such that |z|<B for a rescaled value z. |
double |
getDefaultValue()
Gets the measure default-value. |
double |
getMax()
Gets the measure maximum. |
double |
getMin()
Gets the measure minimum. |
String |
getName()
Gets the measure name. |
double |
getRescaledValue(double value)
Gets a rescaled value of step 1 and such that |z|<B, B being the bound. |
static double[] |
getRescaledValue(Measure[] measures,
double[] values)
Gets a rescaled values from an array of measure and the corresponding values. |
double |
getStep()
Gets the measure step. |
String |
getUnit()
Gets the measure unit. |
double |
getValue()
Gets the measure value. |
Measure |
setDefaultValue(double value)
Sets the measure default-value, default is 0, and return this. |
Measure |
setMax(double max)
Sets the measure maximum, default is +huge, and return this. |
Measure |
setMin(double min)
Sets the measure minimum, default is -huge, and return this. |
Measure |
setName(String name)
Sets the measure name, default is "", and return this. |
Measure |
setStep(double step)
Sets the measure step, default is 1 minimal value is 1e-12, and return this. |
Measure |
setUnit(String unit)
Sets the measure unit, default is "" and return this. |
Measure |
setValue(double value)
Sets the measure value, default is 0, and return this. |
Measure |
setValue(String measure)
Sets this measure, parsing the given string, and return this. |
String |
stringValue()
Gets this measure as a string. |
Methods inherited from class imp.core.Value |
---|
add, cloneThis, create, elements, fields, get, getType, getWrapping, isCyclic, isName, length, load, main, save, set, toString, wrappedObject |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public double getBound()
public double getDefaultValue()
public double getMax()
public double getMin()
public String getName()
public double getRescaledValue(double value)
value
- The raw value to be rescaled and centered, default is this measure value.public static double[] getRescaledValue(Measure[] measures, double[] values)
public double getStep()
public String getUnit()
public double getValue()
public Measure setDefaultValue(double value)
public Measure setMax(double max)
public Measure setMin(double min)
public Measure setName(String name)
public Measure setStep(double step)
public Measure setUnit(String unit)
public Measure setValue(double value)
public Measure setValue(String measure)
measure
- A string of the form $name:$value|$default@$min..$max#$step$unit.
IllegalArgumentException
- if the value is not valid.public String stringValue()
stringValue
in class Value