gpsys.primitives
Class LT

java.lang.Object
  |
  +--gpsys.Primitive
        |
        +--gpsys.Function
              |
              +--gpsys.primitives.LT

public class LT
extends Function

	BOOLEAN LT(<typeX> lvalue, <typeX> rvalue)
 
LT is a generic function that tests if the first argument is less than the second argument. LT needs to be Type instantiated during construction to work with particular argument Types. The supported argument Types include BYTE, SHORT, INT, LONG, FLOAT, DOUBLE, CHAR and BOOLEAN.

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

Fields inherited from class gpsys.Function
argTypes
 
Fields inherited from class gpsys.Primitive
type
 
Constructor Summary
LT(Type argTypes)
          Constructs a LT Function that works with the specified Type.
 
Method Summary
 boolean evaluateBoolean(Individual i, Gene[] arguments)
          Used to execute the LT test for arguments of any of the supported Types.
 Primitive instance()
          Creates an instance of this LT object.
 java.lang.String toString()
          Returns a String representation of this Function.
 
Methods inherited from class gpsys.Function
evaluateByte, evaluateChar, evaluateDouble, evaluateFloat, evaluateInt, evaluateLong, evaluateObject, evaluateShort
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

LT

public LT(Type argTypes)
Constructs a LT Function that works with the specified Type. The supported Types include BYTE, SHORT, INT, LONG, FLOAT and DOUBLE.
Parameters:
type - The Type of this LT Function.
Method Detail

evaluateBoolean

public final boolean evaluateBoolean(Individual i,
                                     Gene[] arguments)
                              throws EvaluationException
Used to execute the LT test for arguments of any of the supported Types.
Parameters:
i - The individual being evaluated.
arguments - The Gene trees representing the arguments to be tested.
Returns:
A boolean whose value is true if the first argument is LT the second argument, and false otherwise.
Throws:
EvaluationException - If there is an evaluation failure.
Overrides:
evaluateBoolean in class Function

instance

public final Primitive instance()
Creates an instance of this LT object. The Type instantiation is preserved so that if an INT LT is being cloned, the clone will also be INT instantiated.
Returns:
A reference to this Object (yes the same object, since the type information is to be the same, there are therefore no instance variables to be modified.
Overrides:
instance in class Primitive

toString

public java.lang.String toString()
Returns a String representation of this Function.
Returns:
A String containing the name of the Function.
Overrides:
toString in class Primitive