| Constructor and Description |
|---|
FunctionNode(Function function,
Arguments arguments)
Constructs a new
FunctionNode with the specified function function and arguments. |
FunctionNode(Function function,
Node... arguments)
Constructs a new
FunctionNode with the specified function function and arguments. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
evaluate(Assignments assignments)
Returns the result of evaluating this
Node using the values of the specified Assignments. |
Arguments |
getArguments() |
Function |
getFunction() |
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 FunctionNode(Function function, Node... arguments)
FunctionNode with the specified function function and arguments.function - the function to associate with this FunctionNodearguments - the arguments (i.e. operands) to apply to function when evaluating this FunctionNodepublic FunctionNode(Function function, Arguments arguments)
FunctionNode with the specified function function and arguments.function - the function to associate with this FunctionNodearguments - the arguments (i.e. operands) to apply to function when evaluating this FunctionNodepublic Function getFunction()
public Arguments getArguments()
public Object evaluate(Assignments assignments)
NodeNode using the values of the specified Assignments.public int getNodeCount()
NodeNode - including any child-nodes.getNodeCount in interface Nodepublic int getHeight()
NodeNode.
The height of a node is the number of edges on the longest downward path between that node and a leaf.
public Type getType()
NodeType of this Node.
This indicates the type of the value returned when #evaluate(Assignments) is called on this Node.
public NodeType getNodeType()
NodeNodeType of this Node.
This can be used to determine if the node is a function, constant or variable node.
getNodeType in interface NodeOakGP Genetic Programming Framework