Constructor and Description |
---|
Lambda(Node node)
Constructs a new node for defining an immutable, anonymous function with
no arguments.
|
Lambda(Node node,
java.lang.String[] variableNames,
java.lang.Class<?>[] variableTypes)
Constructs a new node for defining an immutable, anonymous function with
a user-defined number of arguments.
|
Lambda(Node node,
java.lang.String variableName,
java.lang.Class<?> variableType)
Constructs a new node for defining an immutable, anonymous function with
one argument.
|
Lambda(Node node,
java.lang.String name1,
java.lang.Class<?> type1,
java.lang.String name2,
java.lang.Class<?> type2)
Constructs a new node for defining an immutable, anonymous function with
two arguments.
|
Modifier and Type | Method and Description |
---|---|
Node |
copyNode()
Returns a copy of this node, but without any children or parents
assigned.
|
java.lang.Object |
evaluate(Environment environment)
Evaluates this node in the context of the specified environment.
|
copyTree, getArgument, getArgumentType, getDepth, getFunctionAt, getFunctionAt, getMaximumHeight, getMinimumHeight, getNodeAt, getNodeAt, getNodeAt, getNumberOfArguments, getNumberOfFunctions, getNumberOfFunctions, getNumberOfNodes, getNumberOfNodes, getNumberOfNodes, getNumberOfTerminals, getNumberOfTerminals, getParent, getReturnType, getTerminalAt, getTerminalAt, isFixed, isTerminal, isValid, setArgument, setFixed, setFixedTree, size, toString
public Lambda(Node node)
node
- the body of this functionjava.lang.IllegalArgumentException
- if node
is incomplete or not
strongly typed (i.e., node.isValid()
returns
false
)public Lambda(Node node, java.lang.String variableName, java.lang.Class<?> variableType)
node
- the body of this functionvariableName
- the name of the argumentvariableType
- the type of the argumentjava.lang.IllegalArgumentException
- if node
is incomplete or not
strongly typed (i.e., node.isValid()
returns
false
)public Lambda(Node node, java.lang.String name1, java.lang.Class<?> type1, java.lang.String name2, java.lang.Class<?> type2)
node
- the body of this functionname1
- the name of the first argumenttype1
- the type of the first argumentname2
- the name of the second argumenttype2
- the type of the second argumentjava.lang.IllegalArgumentException
- if node
is incomplete or not
strongly typed (i.e., node.isValid()
returns
false
)public Lambda(Node node, java.lang.String[] variableNames, java.lang.Class<?>[] variableTypes)
node
- the body of this functionvariableNames
- the names of the arguments to this functionvariableTypes
- the types of the arguments to this functionjava.lang.IllegalArgumentException
- if node
is incomplete or not
strongly typed (i.e., node.isValid()
returns
false
)public Node copyNode()
Node
public java.lang.Object evaluate(Environment environment)
Node
Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.