org.rlcommunity.rlglue.codec.taskspec.ranges
Class DoubleRange
java.lang.Object
org.rlcommunity.rlglue.codec.taskspec.ranges.AbstractRange
org.rlcommunity.rlglue.codec.taskspec.ranges.DoubleRange
public class DoubleRange
- extends AbstractRange
- Author:
- Brian Tanner
Method Summary |
double |
getMax()
|
java.lang.String |
getMaxAsString()
Override this is descendant classes and only use super method if max is special. |
double |
getMin()
|
java.lang.String |
getMinAsString()
Override this is descendant classes and only use super method if min is special. |
double |
getRangeSize()
Get the range size. |
protected void |
parseMax(java.lang.String maxString)
|
protected void |
parseMin(java.lang.String minString)
|
void |
setMax(double newMax)
|
void |
setMin(double newMin)
|
java.lang.String |
toString()
|
Methods inherited from class org.rlcommunity.rlglue.codec.taskspec.ranges.AbstractRange |
getHowMany, getMaxInf, getMaxNegInf, getMaxSpecialStatus, getMaxUnspecified, getMinInf, getMinNegInf, getMinSpecialStatus, getMinUnspecified, hasSpecialMaxStatus, hasSpecialMinStatus, parseSpecialMax, parseSpecialMin, setMaxInf, setMaxSpecified, setMaxUnspecified, setMinNegInf, setMinSpecified, setMinUnspecified, toTaskSpec |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DoubleRange
public DoubleRange()
DoubleRange
public DoubleRange(int howMany)
DoubleRange
public DoubleRange(double min,
double max)
DoubleRange
public DoubleRange(double min,
double max,
int howMany)
DoubleRange
public DoubleRange(java.lang.String theRangeString)
getRangeSize
public double getRangeSize()
- Get the range size. If the range is [0,10] then the range is 10.0. If the
range is [.5,1.5], the range is 1.0, etc. Useful for normalizing. Behavior
is undefined if min or max has a special value.
- Returns:
- The size of the range (max-min) if neither is a special value (NEGINF, UNSPEC, etc)
getMin
public double getMin()
getMax
public double getMax()
setMax
public void setMax(double newMax)
setMin
public void setMin(double newMin)
parseMin
protected void parseMin(java.lang.String minString)
- Specified by:
parseMin
in class AbstractRange
parseMax
protected void parseMax(java.lang.String maxString)
- Specified by:
parseMax
in class AbstractRange
getMinAsString
public java.lang.String getMinAsString()
- Description copied from class:
AbstractRange
- Override this is descendant classes and only use super method if min is special.
- Overrides:
getMinAsString
in class AbstractRange
- Returns:
- The minimum value special status as a string (one of NEGINF, POSINF, UNSPEC, NONE
getMaxAsString
public java.lang.String getMaxAsString()
- Description copied from class:
AbstractRange
- Override this is descendant classes and only use super method if max is special.
- Overrides:
getMaxAsString
in class AbstractRange
- Returns:
- The maximum value special status as a string (one of NEGINF, POSINF, UNSPEC, NONE
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object