Constructor and Description |
---|
ConstantNode(Object value,
Type type)
Constructs a new
ConstantNode that represents the specified value. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
evaluate(Assignments assignments)
Returns the value specified when this
ConstantNode was constructed. |
int |
getHeight()
Returns the height of this
Node . |
int |
getNodeCount()
Returns the total number of nodes represented by this
Node - including any child-nodes. |
NodeType |
getNodeType()
Returns the
NodeType of this Node . |
Type |
getType()
Returns the
Type of this Node . |
int |
hashCode() |
String |
toString() |
public Object evaluate(Assignments assignments)
ConstantNode
was constructed.assignments
- represents the values to assign to any variables used in the evaluation of this Node
Node
using the values of the specified Assignments
public Type getType()
Node
Type
of this Node
.
This indicates the type of the value returned when #evaluate(Assignments)
is called on this Node
.
public NodeType getNodeType()
Node
NodeType
of this Node
.
This can be used to determine if the node is a function, constant or variable node.
public final int getHeight()
Node
Node
.
The height of a node is the number of edges on the longest downward path between that node and a leaf.
public final int getNodeCount()
Node
Node
- including any child-nodes.getNodeCount
in interface Node
OakGP Genetic Programming Framework