public class ConstDouble extends ProgramNode
children, parent, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_INT, TYPE_UNDEFINED, values| Constructor and Description |
|---|
ConstDouble(double low,
double high)
Constructs the constant within boundaries.
|
ConstDouble(Element n)
Creates the constant via XML.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
eval()
Returns the constant value.
|
int |
getResultType()
Returns the result type Double.
|
java.lang.String |
getSignature()
Returns the string signature of the node.
|
void |
mutate()
Mutates value by a small percentage value drawn from uniform distribution.
|
void |
randomize()
Assigns a random constant value within boundaries.
|
java.lang.String |
toString()
Returns the string representation of the node.
|
Element |
toXml(Element parent)
Saves the constant to XML.
|
addValue, children, clearValues, clone, create, equals, getAllowsChildren, getChildAt, getChildCount, getIndex, getLevel, getOperandType, getParent, hashCode, insert, isLeaf, remove, remove, removeFromParent, setParent, setUserObjectpublic ConstDouble(double low,
double high)
low - the lower boundhigh - the upper boundpublic ConstDouble(Element n)
n - an XML node elementpublic int getResultType()
getResultType in class ProgramNodepublic java.lang.Object eval()
eval in class ProgramNodepublic void randomize()
randomize in class ProgramNodepublic void mutate()
mutate in class ProgramNodepublic Element toXml(Element parent)
toXml in class ProgramNodeparent - the JDOM parent elementpublic java.lang.String getSignature()
getSignature in class ProgramNodepublic java.lang.String toString()
toString in class ProgramNode