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, setComponentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, isMappable, reset, setComponent, setMappableget, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPathpublic 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 FunctionalParameterpublic LXParameter setValue(double value)
setValue in interface LXParametersetValue in class FunctionalParametervalue - The valueprotected abstract double computeValue()
public final double getValue()
FunctionalParametergetValue in interface LXParametergetValue in class FunctionalParameterpublic final float getValuef()
FunctionalParametergetValuef in interface LXParametergetValuef in class FunctionalParameterpublic BoundedFunctionalParameter setNormalized(double normalized)
setNormalized in interface LXNormalizedParameternormalized - Value from 0-1 through the parameter rangepublic double getNormalized()
getNormalized in interface LXNormalizedParameterpublic float getNormalizedf()
getNormalizedf in interface LXNormalizedParameterpublic LXNormalizedParameter setExponent(double exponent)
public double getExponent()
LXNormalizedParametergetExponent in interface LXNormalizedParameterLX library by Mark C. Slee. © 2012-2020