|
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.SubProgram
public class SubProgram
A connector for indipendent subprograms (subtrees). Each subtree except the last one must have a memory- or stack-modifying command (such as push or store), otherwise there is no connection between the subtrees (which would be useless bloating).
| Field Summary |
|---|
| Fields inherited from class org.jgap.gp.CommandGene |
|---|
BooleanClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, VoidClass |
| Constructor Summary | |
|---|---|
SubProgram(GPConfiguration a_conf,
java.lang.Class[] a_types)
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object a_other)
The compareTo-method. |
boolean |
equals(java.lang.Object a_other)
The equals-method. |
double |
execute_double(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node as a double. |
float |
execute_float(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node as a float. |
int |
execute_int(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node as an integer. |
long |
execute_long(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node as a long. |
java.lang.Object |
execute_object(ProgramChromosome c,
int n,
java.lang.Object[] args)
Executes this node as an object. |
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 SubProgram(GPConfiguration a_conf,
java.lang.Class[] a_types)
throws InvalidConfigurationException
InvalidConfigurationException| Method Detail |
|---|
public java.lang.String toString()
toString in class CommandGene
public int execute_int(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_int in class CommandGenec - ignored heren - ignored hereargs - ignored here
public void execute_void(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_void in class CommandGenec - ignored heren - ignored hereargs - ignored here
public long execute_long(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_long in class CommandGenec - ignored heren - ignored hereargs - ignored here
public float execute_float(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_float in class CommandGenec - ignored heren - ignored hereargs - ignored here
public double execute_double(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_double in class CommandGenec - ignored heren - ignored hereargs - ignored here
public java.lang.Object execute_object(ProgramChromosome c,
int n,
java.lang.Object[] args)
CommandGene
execute_object in class CommandGenec - ignored heren - ignored hereargs - ignored here
public 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 | ||||||||