All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gpsys.lawnmower.ADF2

java.lang.Object
   |
   +----gpsys.Primitive
           |
           +----gpsys.Function
                   |
                   +----gpsys.ADFunction
                           |
                           +----gpsys.lawnmower.ADF2

public class ADF2
extends ADFunction
	Vector2Mod8 ADF2(Vector2Mod8 arg)
 
ADF2 is an automatically defined Function which takes one argument. This is just a wraparound that allows the ADF to be added to the functions set of other ADFs. The actual body of ADF2 is in Chromosome 2 (adf[2]) of an Individual. Note that since the argument to ADF2 occurs in the terminal set of ADF2, it must be treated just like a Terminal, and it is hence defined elsewhere as a terminal.

Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
See Also:
Primitive, Function, ADFunction

Variable Index

 o arg0
A reference to the Terminal defining the argument to this Function.

Constructor Index

 o ADF2(ADF2Arg0)
Create an ADF2 Object.

Method Index

 o evaluateObject(Individual, Gene[])
Evaluate the ADF as one that return an Object (this is necessary since the evaluation actually returns a Vector2Mod8 object).
 o instance()
Creates an instance of this ADF.
 o toString()
Returns a String representation of this Function.

Variables

 o arg0
 ADF2Arg0 arg0
A reference to the Terminal defining the argument to this Function.

Constructors

 o ADF2
 public ADF2(ADF2Arg0 arg0)
Create an ADF2 Object.

Parameters:
arg0 - A reference to the Terminal defining the argument to this Function.

Methods

 o evaluateObject
 public Object evaluateObject(Individual i,
                              Gene arguments[]) throws EvaluationException
Evaluate the ADF as one that return an Object (this is necessary since the evaluation actually returns a Vector2Mod8 object). Before the adf is evaluated, the value of the terminal representing the argument to this ADF is set to the result of evaluating the argument branch of this ADF.

Parameters:
i - The individual being evaluated.
arguments - The Gene trees representing the arguments to this Function.
Returns:
An Object reference, which is the result of evaluating this Function.
Throws: EvaluationException
If there is an evaluation failure.
Overrides:
evaluateObject in class Function
 o instance
 public Primitive instance()
Creates an instance of this ADF.

Returns:
A reference to this same Object since none of the instance variables will ever 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