public enum NodeType extends Enum<NodeType>
Node.getNodeType()
Enum Constant and Description |
---|
CONSTANT
Indicates that a node is a constant node.
|
FUNCTION
Indicates that a node is a function node.
|
VARIABLE
Indicates that a node is a variable node.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
areFunctions(Node n1,
Node n2)
Returns
true if both of the specified nodes are function nodes, else false . |
static boolean |
areTerminals(Node n1,
Node n2)
Returns
true if both of the specified nodes are terminal nodes, else false . |
static boolean |
isConstant(Node n)
Returns
true if the specified node is a constant node, else false . |
static boolean |
isFunction(Node n)
Returns
true if the specified node is a function node, else false . |
static boolean |
isTerminal(Node n)
Returns
true if the specified node is a terminal node, else false . |
static boolean |
isVariable(Node n)
Returns
true if the specified node is a variable node, else false . |
static NodeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeType FUNCTION
FunctionNode
public static final NodeType CONSTANT
ConstantNode
public static final NodeType VARIABLE
VariableNode
public static NodeType[] values()
for (NodeType c : NodeType.values()) System.out.println(c);
public static NodeType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static boolean areFunctions(Node n1, Node n2)
true
if both of the specified nodes are function nodes, else false
.public static boolean isFunction(Node n)
true
if the specified node is a function node, else false
.public static boolean areTerminals(Node n1, Node n2)
true
if both of the specified nodes are terminal nodes, else false
.public static boolean isTerminal(Node n)
true
if the specified node is a terminal node, else false
.public static boolean isConstant(Node n)
true
if the specified node is a constant node, else false
.public static boolean isVariable(Node n)
true
if the specified node is a variable node, else false
.OakGP Genetic Programming Framework