|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gpsys.Gene
|
+--gpsys.GeneTerminal
A GeneTerminal is a leaf in a Gene tree and represents a Terminal.
| Fields inherited from class gpsys.Gene |
p |
| Constructor Summary | |
(package private) |
GeneTerminal(int maxDepth,
Type type,
GPParameters gpParameters,
int adfIndex)
Constructs a Gene Terminal by randomly selecting a Terminal of the required type from the Terminal set of the associated Chromosome. |
| Method Summary | |
int |
complexity()
Get the number of Genes in this Gene. |
Gene |
deepClone()
Make a clone of this Gene. |
int |
depth()
Calculate the maximum depth of this Gene. |
boolean |
evaluateBoolean(Individual i)
Evaluate this Gene as Terminal returning a boolean. |
byte |
evaluateByte(Individual i)
Evaluate this Gene as Terminal returning a byte. |
char |
evaluateChar(Individual i)
Evaluate this Gene as Terminal returning a char. |
double |
evaluateDouble(Individual i)
Evaluate this Gene as Terminal returning a double. |
float |
evaluateFloat(Individual i)
Evaluate this Gene as Terminal returning a float. |
int |
evaluateInt(Individual i)
Evaluate this Gene as Terminal returning an int. |
long |
evaluateLong(Individual i)
Evaluate this Gene as Terminal returning a long. |
java.lang.Object |
evaluateObject(Individual i)
Evaluate this Gene as Terminal returning an Object reference. |
short |
evaluateShort(Individual i)
Evaluate this Gene as Terminal returning a short. |
java.lang.String |
toString()
Create a String representing this Gene. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
GeneTerminal(int maxDepth,
Type type,
GPParameters gpParameters,
int adfIndex)
throws TypeException
maxDepth - the maximum depth of the Gene tree to be generated.type - the required return type of top node in the tree.gpParameters - the GP parameters for this run.adfIndex - the index of the ChromosomeParameters to used.| Method Detail |
public java.lang.Object evaluateObject(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public byte evaluateByte(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public short evaluateShort(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public int evaluateInt(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public long evaluateLong(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public float evaluateFloat(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public double evaluateDouble(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public char evaluateChar(Individual i)
throws EvaluationException
i - the individual to which this Gene belongs
public boolean evaluateBoolean(Individual i)
throws EvaluationException
i - the individual to which this Gene belongspublic int depth()
public int complexity()
public Gene deepClone()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||