|
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.terminal.Terminal
public class Terminal
A terminal is a static number that can be mutated.
| Field Summary |
|---|
| Fields inherited from class org.jgap.gp.CommandGene |
|---|
BooleanClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, VoidClass |
| Constructor Summary | |
|---|---|
Terminal()
|
|
Terminal(GPConfiguration a_conf,
java.lang.Class a_returnType)
|
|
Terminal(GPConfiguration a_conf,
java.lang.Class a_returnType,
double a_minValue,
double a_maxValue)
|
|
| Method Summary | |
|---|---|
CommandGene |
applyMutation(int index,
double a_percentage)
Mutates a CommandGene |
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.Class |
getChildType(IGPProgram a_ind,
int a_chromNum)
Gets the type of node allowed form the given child number. |
protected void |
setRandomValue()
|
protected void |
setRandomValue(double a_value)
|
protected void |
setRandomValue(float a_value)
|
protected void |
setRandomValue(int a_value)
|
protected void |
setRandomValue(long a_value)
|
void |
setValue(double a_value)
|
void |
setValue(float a_value)
|
void |
setValue(int a_value)
|
void |
setValue(long a_value)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Terminal()
throws InvalidConfigurationException
InvalidConfigurationException
public Terminal(GPConfiguration a_conf,
java.lang.Class a_returnType)
throws InvalidConfigurationException
InvalidConfigurationException
public Terminal(GPConfiguration a_conf,
java.lang.Class a_returnType,
double a_minValue,
double a_maxValue)
throws InvalidConfigurationException
InvalidConfigurationException| Method Detail |
|---|
protected void setRandomValue(int a_value)
protected void setRandomValue(long a_value)
protected void setRandomValue(double a_value)
protected void setRandomValue(float a_value)
protected void setRandomValue()
public void setValue(double a_value)
public void setValue(float a_value)
public void setValue(int a_value)
public void setValue(long a_value)
public CommandGene applyMutation(int index,
double a_percentage)
throws InvalidConfigurationException
IMutateable
applyMutation in interface IMutateableindex - references the part of a multipart object, normally not
relevanta_percentage - the mutation rate (0.0 to 1.0)
InvalidConfigurationExceptionpublic 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 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.Class getChildType(IGPProgram a_ind,
int a_chromNum)
CommandGene
getChildType in class CommandGenea_ind - the individual the child belongs toa_chromNum - the chromosome number
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||