All Packages Class Hierarchy This Package Previous Next Index
Class gpsys.Terminal
java.lang.Object
|
+----gpsys.Primitive
|
+----gpsys.Terminal
- public abstract class Terminal
- extends Primitive
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.
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
- See Also:
- Primitive, primitive
-
Terminal()
-
-
evaluateBoolean(Individual)
- To be overridden by Terminals returning a boolean when evaluated.
-
evaluateByte(Individual)
- To be overridden by Terminals returning a byte when evaluated.
-
evaluateChar(Individual)
- To be overridden by Terminals returning a char when evaluated.
-
evaluateDouble(Individual)
- To be overridden by Terminals returning a double when evaluated.
-
evaluateFloat(Individual)
- To be overridden by Terminals returning a float when evaluated.
-
evaluateInt(Individual)
- To be overridden by Terminals returning an int when evaluated.
-
evaluateLong(Individual)
- To be overridden by Terminals returning a long when evaluated.
-
evaluateObject(Individual)
- To be overridden by Terminals returning an Object when evaluated.
-
evaluateShort(Individual)
- To be overridden by Terminals returning a short when evaluated.
Terminal
public Terminal()
evaluateObject
public Object evaluateObject(Individual i) throws EvaluationException
- To be overridden by Terminals returning an Object when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A reference to an Object which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateByte
public byte evaluateByte(Individual i) throws EvaluationException
- To be overridden by Terminals returning a byte when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A byte which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateShort
public short evaluateShort(Individual i) throws EvaluationException
- To be overridden by Terminals returning a short when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A short which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateInt
public int evaluateInt(Individual i) throws EvaluationException
- To be overridden by Terminals returning an int when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- An int which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateLong
public long evaluateLong(Individual i) throws EvaluationException
- To be overridden by Terminals returning a long when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A long which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateFloat
public float evaluateFloat(Individual i) throws EvaluationException
- To be overridden by Terminals returning a float when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A float which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateDouble
public double evaluateDouble(Individual i) throws EvaluationException
- To be overridden by Terminals returning a double when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A double which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateChar
public char evaluateChar(Individual i) throws EvaluationException
- To be overridden by Terminals returning a char when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A char which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
evaluateBoolean
public boolean evaluateBoolean(Individual i) throws EvaluationException
- To be overridden by Terminals returning a boolean when evaluated.
- Parameters:
- i - the individual that is being evaluated.
- Returns:
- A boolean which is the evaluation result.
- Throws: EvaluationException
- If this method is called.
All Packages Class Hierarchy This Package Previous Next Index