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.
- Version:
- 1.1, 30th June '97
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
- See Also:
- Primitive, Function, ADFunction
-
ADF2(ADF2Arg0)
- Create an ADF2 Object.
-
evaluateObject(Individual, Gene[])
- Evaluate the ADF as one that return an Object (this is necessary since
the evaluation actually returns a Vector2Mod8 object).
-
instance()
- Creates an instance of this ADF.
-
toString()
- Returns a String representation of this Function.
ADF2
public ADF2(ADF2Arg0 arg0)
- Create an ADF2 Object.
- Parameters:
- arg0 - A reference to the Terminal defining the argument to
this Function.
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
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
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