|
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.ForLoop
public class ForLoop
The for-loop.
| Field Summary |
|---|
| Fields inherited from class org.jgap.gp.CommandGene |
|---|
BooleanClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, VoidClass |
| Constructor Summary | |
|---|---|
ForLoop(GPConfiguration a_conf,
java.lang.Class a_typeVar,
int a_maxLoop)
Constructor. |
|
ForLoop(GPConfiguration a_conf,
java.lang.Class a_typeVar,
int a_startIndex,
int a_maxLoop)
Constructor allowing to preset the starting index of the loop. |
|
| Method Summary | |
|---|---|
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)
Gets the type of node allowed form the given child number. |
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 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ForLoop(GPConfiguration a_conf,
java.lang.Class a_typeVar,
int a_maxLoop)
throws InvalidConfigurationException
a_conf - the configuration to usea_typeVar - Class of the loop counter terminakl (e.g. IntegerClass)a_maxLoop - the maximum number of loops to perform
InvalidConfigurationException
public ForLoop(GPConfiguration a_conf,
java.lang.Class a_typeVar,
int a_startIndex,
int a_maxLoop)
throws InvalidConfigurationException
a_conf - the configuration to usea_typeVar - Class of the loop counter terminakl (e.g. IntegerClass)a_startIndex - index to start the loop with (normally 0)a_maxLoop - the maximum number of loops to perform
InvalidConfigurationException| Method Detail |
|---|
public java.lang.String toString()
toString in class CommandGene
public void execute_void(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_void in class CommandGenec - ignored heren - ignored hereargs - ignored herepublic boolean isValid(ProgramChromosome a_program)
CommandGene
isValid in class CommandGenea_program - the ProgramChromosome to validate
public java.lang.Class getChildType(IGPProgram a_ind,
int a_chromNum)
CommandGene
getChildType in class CommandGenea_ind - the individual the child belongs toa_chromNum - the chromosome number
public int compareTo(java.lang.Object a_other)
compareTo in interface java.lang.ComparablecompareTo in class CommandGenea_other - the other object to compare
public boolean equals(java.lang.Object a_other)
equals in class CommandGenea_other - the other object to compare
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||