All Packages Class Hierarchy This Package Previous Next Index
Class gpsys.primitives.Or
java.lang.Object
|
+----gpsys.Primitive
|
+----gpsys.Function
|
+----gpsys.primitives.Or
- public class Or
- extends Function
BOOLEAN or(BOOLEAN b1, BOOLEAN b2)
Or is a boolean function that returns the logical "or" of both arguments.
Note that Or is NOT lazy, so that both arguments are still evaluated even
if the first argument is True.
- Version:
- 1.1, 30th June '97
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
- See Also:
- Type, Primitive, Function
-
Or()
- Construct an instance of the Or Function.
-
evaluateBoolean(Individual, Gene[])
- Perform the logical Or of both arguments and return the result.
-
instance()
- Creates an instance of this Function.
-
toString()
- Returns a String representation of this Function.
Or
public Or()
- Construct an instance of the Or Function. The Or Function is of
BOOLEAN Type and is hence typed accordingly.
evaluateBoolean
public final boolean evaluateBoolean(Individual i,
Gene arguments[]) throws EvaluationException
- Perform the logical Or of both arguments and return the result.
- Parameters:
- i - The individual being evaluated.
- arguments - The Gene trees representing the arguments to be Ored.
- Returns:
- A boolean representing the logical or of the arguments.
- Throws: EvaluationException
- If there is an evaluation failure.
- Overrides:
- evaluateBoolean in class Function
instance
public final Primitive instance()
- Creates an instance of this Function.
- Returns:
- A reference to this object.
- 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