gpsys.lawnmower
Class ConstantVector2Mod8

java.lang.Object
  |
  +--gpsys.Primitive
        |
        +--gpsys.Terminal
              |
              +--gpsys.lawnmower.ConstantVector2Mod8

public class ConstantVector2Mod8
extends Terminal

	Vector2Mod8 ConstantVector2Mod8
 
Creates a Terminal representing an ephemeral random constant of Type Vector2Mod8.

Version:
$Revision: 1.1 $, $Date: 2000/07/05 16:26:49 $
Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
See Also:
Type, Primitive, Terminal, Serialized Form

Field Summary
private  java.util.Random rng
          The random number generator.
 Vector2Mod8 v
          The value of this constant.
 
Fields inherited from class gpsys.Primitive
type
 
Constructor Summary
ConstantVector2Mod8(java.util.Random rng)
          Create a new ephemeral random Vector2Mod8 constant in the range (0,0) to (8,8).
 
Method Summary
 java.lang.Object evaluateObject(Individual i)
          Evaluate this Terminal.
 Primitive instance()
          Creates a new Vector2Mod8 constant in exactly the same range as this constant, and using the same random number generator.
 java.lang.String toString()
          Returns the value of the constant as a String.
 
Methods inherited from class gpsys.Terminal
evaluateBoolean, evaluateByte, evaluateChar, evaluateDouble, evaluateFloat, evaluateInt, evaluateLong, evaluateShort
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

v

public Vector2Mod8 v
The value of this constant.

rng

private java.util.Random rng
The random number generator.
Constructor Detail

ConstantVector2Mod8

public ConstantVector2Mod8(java.util.Random rng)
Create a new ephemeral random Vector2Mod8 constant in the range (0,0) to (8,8).
Parameters:
rng - The random number generator to be used.
Method Detail

evaluateObject

public final java.lang.Object evaluateObject(Individual i)
Evaluate this Terminal.
Parameters:
i - The individual being evaluated.
Returns:
The value of the constant.
Overrides:
evaluateObject in class Terminal

instance

public final Primitive instance()
Creates a new Vector2Mod8 constant in exactly the same range as this constant, and using the same random number generator.
Returns:
A new Vector2Mod8 constant in exactly the same range.
Overrides:
instance in class Primitive

toString

public java.lang.String toString()
Returns the value of the constant as a String.
Returns:
A String representing the value of this constant.
Overrides:
toString in class Primitive