|
JGAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgap.gp.CommandGene
org.jgap.gp.function.AddAndStoreTerminal
public class AddAndStoreTerminal
Stores a value in the internal memory but adds the value already stored in the target memory cell before storing it.
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 | |
---|---|
AddAndStoreTerminal(GPConfiguration a_conf,
java.lang.String a_storageName,
java.lang.Class a_childType)
Constructor. |
|
AddAndStoreTerminal(GPConfiguration a_conf,
java.lang.String a_storageName,
java.lang.Class a_childType,
int a_subReturnType,
int a_subChildType)
Allows setting a sub type and sub return type. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object a_other)
The compareTo-method. |
boolean |
equals(java.lang.Object a_other)
The equals-method. |
void |
execute_void(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node, returning nothing. |
java.lang.Class |
getChildType(IGPProgram a_ind,
int a_chromNum)
Determines which type a specific child of this command has. |
java.lang.String |
getName()
|
boolean |
isAffectGlobalState()
|
boolean |
isValid(ProgramChromosome a_program)
Subclasses capable of validating programs should overwrite this method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AddAndStoreTerminal(GPConfiguration a_conf, java.lang.String a_storageName, java.lang.Class a_childType) throws InvalidConfigurationException
a_conf
- GPConfigurationa_storageName
- Stringa_childType
- Class
InvalidConfigurationException
public AddAndStoreTerminal(GPConfiguration a_conf, java.lang.String a_storageName, java.lang.Class a_childType, int a_subReturnType, int a_subChildType) throws InvalidConfigurationException
a_conf
- GPConfigurationa_storageName
- Stringa_childType
- Classa_subChildType
- inta_subReturnType
- int
InvalidConfigurationException
Method Detail |
---|
public java.lang.String toString()
toString
in class CommandGene
public java.lang.String getName()
getName
in class CommandGene
public void execute_void(ProgramChromosome c, int n, java.lang.Object[] args)
CommandGene
execute_void
in class CommandGene
c
- ignored heren
- ignored hereargs
- ignored herepublic boolean isAffectGlobalState()
isAffectGlobalState
in class CommandGene
public boolean isValid(ProgramChromosome a_program)
CommandGene
isValid
in class CommandGene
a_program
- the ProgramChromosome to validate
public java.lang.Class getChildType(IGPProgram a_ind, int a_chromNum)
getChildType
in class CommandGene
a_ind
- ignored herea_chromNum
- index of child
public int compareTo(java.lang.Object a_other)
compareTo
in interface java.lang.Comparable
compareTo
in class CommandGene
a_other
- the other object to compare
public boolean equals(java.lang.Object a_other)
equals
in class CommandGene
a_other
- the other object to compare
public java.lang.Object clone()
clone
in interface ICloneable
clone
in class java.lang.Object
|
JGAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |