JGAP

examples.gp.paintedDesert
Class SandColor

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

public class SandColor
extends AntCommand

Returns the color of the sand at the current position.

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
SandColor(GPConfiguration a_conf)
          Allows to specify how many fields to look ahead to the right.
 
Method Summary
 int execute_int(ProgramChromosome a_chrom, int a_n, java.lang.Object[] a_args)
          Executes this node as an integer.
 java.lang.String toString()
           
 
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

SandColor

public SandColor(GPConfiguration a_conf)
          throws InvalidConfigurationException
Allows to specify how many fields to look ahead to the right.

Parameters:
a_conf - the configuration to use
a_lookAheadFields - look ahead n fields
Throws:
InvalidConfigurationException
Since:
3.01
Method Detail

execute_int

public int execute_int(ProgramChromosome a_chrom,
                       int a_n,
                       java.lang.Object[] a_args)
Description copied from class: CommandGene
Executes this node as an integer. Override to implement.

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()
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