|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gpsys.Primitive
|
+--gpsys.Terminal
The super class of all GP Terminals. A Terminal is a primitive that take no arguments. This abstract class should be extended to create your own Terminals. One or more of the evaulation methods should be overridden to create the desired value. The reason the evaulation methods have not been declared abstract is to relieve the burden of subclasses having to define all of the different evaluation methods, when only one is needed.
Primitive,
gpsys.primitive, Serialized Form| Fields inherited from class gpsys.Primitive |
type |
| Constructor Summary | |
Terminal()
|
|
| Method Summary | |
boolean |
evaluateBoolean(Individual i)
To be overridden by Terminals returning a boolean when evaluated. |
byte |
evaluateByte(Individual i)
To be overridden by Terminals returning a byte when evaluated. |
char |
evaluateChar(Individual i)
To be overridden by Terminals returning a char when evaluated. |
double |
evaluateDouble(Individual i)
To be overridden by Terminals returning a double when evaluated. |
float |
evaluateFloat(Individual i)
To be overridden by Terminals returning a float when evaluated. |
int |
evaluateInt(Individual i)
To be overridden by Terminals returning an int when evaluated. |
long |
evaluateLong(Individual i)
To be overridden by Terminals returning a long when evaluated. |
java.lang.Object |
evaluateObject(Individual i)
To be overridden by Terminals returning an Object when evaluated. |
short |
evaluateShort(Individual i)
To be overridden by Terminals returning a short when evaluated. |
| Methods inherited from class gpsys.Primitive |
instance,
toString |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Terminal()
| Method Detail |
public java.lang.Object evaluateObject(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public byte evaluateByte(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public short evaluateShort(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public int evaluateInt(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public long evaluateLong(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public float evaluateFloat(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public double evaluateDouble(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public char evaluateChar(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
public boolean evaluateBoolean(Individual i)
throws EvaluationException
i - the individual that is being evaluated.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||