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

Variable Index

 o mower

Constructor Index

 o Frog(Mower)
Create a Frog object that controls the specified lawn mower.

Method Index

 o evaluateObject(Individual, Gene[])
Evaluates this Function, causing the mower to leap frog by the specified displacement.
 o instance()
Creates a new instance of this Object.
 o toString()
Returns a String representation of this Function.

Variables

 o mower
 Mower mower

Constructors

 o Frog
 public Frog(Mower mower)
Create a Frog object that controls the specified lawn mower.

Parameters:
mower - The Mower to move.

Methods

 o 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
 o 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
 o 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