|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gpsys.Primitive
|
+--gpsys.Function
|
+--gpsys.primitives.ProgN
<typeX> ProgN(<typeX> a1, <typeX> a2, ..., <typeX> aN)ProgN is a generic function that takes N arguments of the same type, evaluates all of them, and returns the value of the last argument. Supported Types include OBJECT, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE, CHAR and BOOLEAN.
Type,
Primitive,
Function, Serialized Form| Fields inherited from class gpsys.Function |
argTypes |
| Fields inherited from class gpsys.Primitive |
type |
| Constructor Summary | |
ProgN(Type returnType,
int argNum)
Constructs a new ProgN Function which takes the specified number of arguments, all of which are of the specified type. |
|
| Method Summary | |
boolean |
evaluateBoolean(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type BOOLEAN. |
byte |
evaluateByte(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type BYTE. |
char |
evaluateChar(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type CHAR. |
double |
evaluateDouble(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type DOUBLE. |
float |
evaluateFloat(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type FLOAT. |
int |
evaluateInt(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type INT. |
long |
evaluateLong(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type LONG. |
java.lang.Object |
evaluateObject(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type OBJECT. |
short |
evaluateShort(Individual i,
Gene[] arguments)
Used to evaluate a ProgN Function of Type SHORT. |
Primitive |
instance()
Creates an instance of this ProgN object. |
java.lang.String |
toString()
Returns a String representation of this Function. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public ProgN(Type returnType,
int argNum)
returnType - The type of all the arguments. This must be one
one of OBJECT, BYTE, SHORT, INT, LONG, FLOAT,
DOUBLE, CHAR or BOOLEAN.argNum - The number of arguments taken by the Function.| Method Detail |
public final java.lang.Object evaluateObject(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final byte evaluateByte(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final short evaluateShort(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final int evaluateInt(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final long evaluateLong(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final float evaluateFloat(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final double evaluateDouble(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final char evaluateChar(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.
public final boolean evaluateBoolean(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees representing the arguments to be
evaluated.public final Primitive instance()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||