examples.gp.paintedDesert
Class Carrying
java.lang.Object
org.jgap.gp.CommandGene
examples.gp.paintedDesert.AntCommand
examples.gp.paintedDesert.Carrying
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public class Carrying
- extends AntCommand
Terminal function to identify the sand, if any, the ant is carrying.
- Since:
- 3.2
- See Also:
- Serialized Form
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 |
Carrying
public Carrying(GPConfiguration a_conf)
throws InvalidConfigurationException
- Constructor for the Carrying function.
- Parameters:
a_conf
- the configuration to use
- Throws:
InvalidConfigurationException
execute_int
public int execute_int(ProgramChromosome a_chrom,
int a_n,
java.lang.Object[] a_args)
- Returns the sand the ant is carrying
- Overrides:
execute_int
in class CommandGene
- Parameters:
a_chrom
- ignored herea_n
- ignored herea_args
- ignored here
- Returns:
- nothing but exception
toString
public java.lang.String toString()
- Program listing name
- Specified by:
toString
in class CommandGene
- Returns:
- the string representation of the command. Especially usefull to
output a resulting formula in human-readable form.