public abstract class BoundedFunctionalParameter extends FunctionalParameter implements LXNormalizedParameter
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
Modifier and Type | Field and Description |
---|---|
BoundedParameter.Range |
range
Range of the parameter
|
description
Modifier | Constructor and Description |
---|---|
|
BoundedFunctionalParameter(String label)
A bounded functional parameter with a range of 0-1
|
protected |
BoundedFunctionalParameter(String label,
double max)
A bounded functional parameter with a range of 0 to max
|
protected |
BoundedFunctionalParameter(String label,
double v0,
double v1)
A bounded functional parameter with a range from v0 to v1.
|
Modifier and Type | Method and Description |
---|---|
protected abstract double |
computeValue()
Retrieves the raw value of the parameter, subclass must implement.
|
double |
getExponent()
Gets the exponent used for scaling this parameter across its normalized range.
|
double |
getNormalized()
Gets a normalized value of the parameter from 0 to 1
|
float |
getNormalizedf()
Normalized value as a float
|
double |
getValue()
Retrieves the value of the parameter, subclass must implement.
|
float |
getValuef()
Utility helper function to get the value of the parameter as a float.
|
BoundedFunctionalParameter |
setDescription(String description) |
LXNormalizedParameter |
setExponent(double exponent) |
BoundedFunctionalParameter |
setNormalized(double normalized)
Sets the value of parameter using normal 0-1
|
LXParameter |
setValue(double value)
Not supported for this parameter type unless subclass overrides.
|
dispose, getDescription, getFormatter, getLabel, getParent, getPath, getPolarity, getUnits, reset, setComponent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, isMappable, reset, setComponent, setMappable
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPath
public final BoundedParameter.Range range
public BoundedFunctionalParameter(String label)
label
- Label for parameterprotected BoundedFunctionalParameter(String label, double max)
label
- Label for parametermax
- Maximum valueprotected BoundedFunctionalParameter(String label, double v0, double v1)
label
- Label for parameterv0
- Start of rangev1
- End of rangepublic BoundedFunctionalParameter setDescription(String description)
setDescription
in class FunctionalParameter
public LXParameter setValue(double value)
setValue
in interface LXParameter
setValue
in class FunctionalParameter
value
- The valueprotected abstract double computeValue()
public final double getValue()
FunctionalParameter
getValue
in interface LXParameter
getValue
in class FunctionalParameter
public final float getValuef()
FunctionalParameter
getValuef
in interface LXParameter
getValuef
in class FunctionalParameter
public BoundedFunctionalParameter setNormalized(double normalized)
setNormalized
in interface LXNormalizedParameter
normalized
- Value from 0-1 through the parameter rangepublic double getNormalized()
getNormalized
in interface LXNormalizedParameter
public float getNormalizedf()
getNormalizedf
in interface LXNormalizedParameter
public LXNormalizedParameter setExponent(double exponent)
public double getExponent()
LXNormalizedParameter
getExponent
in interface LXNormalizedParameter
LX library by Mark C. Slee. © 2012-2020