All Packages Class Hierarchy This Package Previous Next Index
Class gpsys.lawnmower.Frog
java.lang.Object
|
+----gpsys.Primitive
|
+----gpsys.Function
|
+----gpsys.lawnmower.Frog
- public class Frog
- extends Function
Vector2Mod8 Frog(Vector2Mod8 displacement)
The Frog Function allows the lawn mower to leap frog by specified X and Y
displacements on the lawn. It takes a single Vector2Mod8 argument which
represents the displacement and returns the same argument.
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
- See Also:
- Type, Primitive, Terminal
-
mower
-
-
Frog(Mower)
- Create a Frog object that controls the specified lawn mower.
-
evaluateObject(Individual, Gene[])
- Evaluates this Function, causing the mower to leap frog by the
specified displacement.
-
instance()
- Creates a new instance of this Object.
-
toString()
- Returns a String representation of this Function.
mower
Mower mower
Frog
public Frog(Mower mower)
- Create a Frog object that controls the specified lawn mower.
- Parameters:
- mower - The Mower to move.
evaluateObject
public final Object evaluateObject(Individual i,
Gene arguments[]) throws EvaluationException
- Evaluates this Function, causing the mower to leap frog by the
specified displacement.
- Parameters:
- i - The individual being evaluated.
- arguments - The Gene tree representing the displacement.
- Returns:
- An Object (actually a Vector2Mod8) representing the
displacement.
- Throws: EvaluationException
- If there is an evaluation failure.
- Overrides:
- evaluateObject in class Function
instance
public final Primitive instance()
- Creates a new instance of this Object.
- Returns:
- A reference to this same Object since none of the instance
variables are to be changed.
- Overrides:
- instance in class Primitive
toString
public String toString()
- Returns a String representation of this Function.
- Returns:
- A String containing the name of the Function.
- Overrides:
- toString in class Primitive
All Packages Class Hierarchy This Package Previous Next Index