JGAP

examples.gp.paintedDesert
Class Pickup

java.lang.Object
  extended by org.jgap.gp.CommandGene
      extended by examples.gp.paintedDesert.AntCommand
          extended by examples.gp.paintedDesert.Pickup
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Pickup
extends AntCommand

Picks up any sand at the current location and returns the sand color at the current location.

Since:
3.2
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jgap.gp.CommandGene
CommandGene.COMMAND_TYPE
 
Field Summary
 
Fields inherited from class org.jgap.gp.CommandGene
BooleanClass, CharacterClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, nodeIndex, VoidClass
 
Constructor Summary
Pickup(GPConfiguration a_conf)
          Constructor for the pickup sand function
 
Method Summary
 int execute_int(ProgramChromosome a_chrom, int a_n, java.lang.Object[] a_args)
          Executes the function for an integer argument
 java.lang.String toString()
          Program listing anme for the function
 
Methods inherited from class examples.gp.paintedDesert.AntCommand
getMap
 
Methods inherited from class org.jgap.gp.CommandGene
check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, execute_double, execute_float, execute_long, execute_object, execute_void, execute, getAllele, getApplicationData, getArity, getArityMax, getArityMin, getChildType, getCommandType, getEnergy, getGPConfiguration, getInternalValue, getName, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, isValid, isValid, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pickup

public Pickup(GPConfiguration a_conf)
       throws InvalidConfigurationException
Constructor for the pickup sand function

Throws:
InvalidConfigurationException
Method Detail

execute_int

public int execute_int(ProgramChromosome a_chrom,
                       int a_n,
                       java.lang.Object[] a_args)
Executes the function for an integer argument

Overrides:
execute_int in class CommandGene
Parameters:
a_chrom - ignored here
a_n - ignored here
a_args - ignored here
Returns:
nothing but exception

toString

public java.lang.String toString()
Program listing anme for the function

Specified by:
toString in class CommandGene
Returns:
the string representation of the command. Especially usefull to output a resulting formula in human-readable form.

JGAP