|
|||||||||
| Home >> All >> org >> maloi >> evolvo >> [ expressiontree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.maloi.evolvo.expressiontree
Class Value

java.lang.Objectorg.maloi.evolvo.expressiontree.ExpressionTree
org.maloi.evolvo.expressiontree.Value
- All Implemented Interfaces:
- java.io.Serializable
- public class Value
- extends ExpressionTree
- implements java.io.Serializable
- extends ExpressionTree
Terminal node for an expressionTree that stores a double value.
| Field Summary | |
(package private) double |
v
The value being stored. |
| Fields inherited from class org.maloi.evolvo.expressiontree.ExpressionTree |
cacheable, cachedValue, operator, params, vp |
| Constructor Summary | |
Value(double p)
Class constructor that sets the node's value. |
|
| Method Summary | |
void |
buildMachine(org.maloi.evolvo.expressiontree.vm.Machine myMachine)
|
ExpressionTree |
getClone()
Convenience method to retrieve a clone of expressionTree as type expressionTree. |
org.maloi.evolvo.expressiontree.vm.Machine |
getMachine()
Builds a simple stack machine to evaluate this expression. |
int |
getNumParams()
Returns the number of parameters this node expects. |
ExpressionTree[] |
getParams()
Returns the parameters this node is holding. |
double |
getValue()
|
void |
setParams(ExpressionTree[] dummy)
Set this node's parameters. |
void |
setValue(double p)
Sets the value's value. |
java.lang.String |
toString()
Returns the value's value as a string. |
| Methods inherited from class org.maloi.evolvo.expressiontree.ExpressionTree |
getName, getOperator, getParamLength, setOperator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
v
double v
- The value being stored.
| Constructor Detail |
Value
public Value(double p)
- Class constructor that sets the node's value.
| Method Detail |
getValue
public double getValue()
getClone
public ExpressionTree getClone()
- Description copied from class:
ExpressionTree - Convenience method to retrieve a clone of expressionTree as type
expressionTree.
- Overrides:
getClonein classExpressionTree
toString
public java.lang.String toString()
- Returns the value's value as a string.
- Overrides:
toStringin classExpressionTree
setValue
public void setValue(double p)
- Sets the value's value.
getNumParams
public int getNumParams()
- Returns the number of parameters this node expects.
- Overrides:
getNumParamsin classExpressionTree
getParams
public ExpressionTree[] getParams()
- Returns the parameters this node is holding.
- Overrides:
getParamsin classExpressionTree
setParams
public void setParams(ExpressionTree[] dummy)
- Description copied from class:
ExpressionTree - Set this node's parameters.
Note: Currently does not check that p[] has the correct number of
elements. If p[] has too many elements, the extras are simply thrown
out.
If, however, there are too few, the results are unpredicatable.
This behavior should be modified in future versions to be more robust.
- Overrides:
setParamsin classExpressionTree
getMachine
public org.maloi.evolvo.expressiontree.vm.Machine getMachine()
- Builds a simple stack machine to evaluate this expression.
Simply creates a new machine and passes it on to
the buildMachine(machine) method.
- Overrides:
getMachinein classExpressionTree
buildMachine
public void buildMachine(org.maloi.evolvo.expressiontree.vm.Machine myMachine)
- Overrides:
buildMachinein classExpressionTree
|
|||||||||
| Home >> All >> org >> maloi >> evolvo >> [ expressiontree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC