public final class If extends Object implements Function
Expects three arguments:
true.false.| Constructor and Description |
|---|
If(Type type)
Constructs a selection operator that returns values of the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Arguments arguments,
Assignments assignments)
Returns the result of applying this operation to the specified
Arguments and Assignments. |
Signature |
getSignature()
Returns the return type and argument types associated with this function.
|
Node |
simplify(Arguments arguments)
Attempts to find a simplified alternative to applying this function to the specified arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayName, isPurepublic If(Type type)
public Object evaluate(Arguments arguments, Assignments assignments)
FunctionArguments and Assignments.public Signature getSignature()
FunctiongetSignature in interface Functionpublic Node simplify(Arguments arguments)
Function
Simplification can occur by replacing expressions with constant values (e.g. replacing (+ 1 1) with 2) or removing redundant branches
(e.g. replacing (if (< 2 3) (+ v0 v1) (* v0 v1)) with (+ v0 v1).
simplify in interface Functionarguments - the arguments to be applied to (i.e. evaluated by) this functionnull if unable to simplify.NodeSimplifierOakGP Genetic Programming Framework