Modifier and Type | Method and Description |
---|---|
static LessThan |
create(Type t)
Returns a
LessThan for comparing functions of the specified type. |
Object |
evaluate(Arguments arguments,
Assignments assignments)
Returns the result of applying this operation to the specified
Arguments and Assignments . |
protected boolean |
evaluate(int diff) |
String |
getDisplayName()
Returns the
String value to use in the textual representation of this function. |
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.
|
public static LessThan create(Type t)
LessThan
for comparing functions of the specified type.
If this is the first call to #create(Type)
with the specified Type
then a new instance will be created and returned. If there has
previously been calls to #create(Type)
for the specified Type
then the existing instance will be returned.
protected boolean evaluate(int diff)
public String getDisplayName()
Function
String
value to use in the textual representation of this function.public final Object evaluate(Arguments arguments, Assignments assignments)
Function
Arguments
and Assignments
.public final Signature getSignature()
Function
getSignature
in interface Function
public 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 Function
arguments
- the arguments to be applied to (i.e. evaluated by) this functionnull
if unable to simplify.NodeSimplifier
OakGP Genetic Programming Framework