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 FunctionNode
arguments
- the arguments (i.e. operands) to apply to function
when evaluating this FunctionNode
public FunctionNode(Function function, Arguments arguments)
FunctionNode
with the specified function function and arguments.function
- the function to associate with this FunctionNode
arguments
- the arguments (i.e. operands) to apply to function
when evaluating this FunctionNode
public Function getFunction()
public Arguments getArguments()
public Object evaluate(Assignments assignments)
Node
Node
using the values of the specified Assignments
.public int getNodeCount()
Node
Node
- including any child-nodes.getNodeCount
in interface Node
public 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 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.
getNodeType
in interface Node
OakGP Genetic Programming Framework