|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gpsys.Chromosome
A Chromosome defines an evolvable gene tree.
Terminal, Serialized Form| Field Summary | |
(package private) int |
adf
index into the adf array in the gpParameters. |
(package private) int |
complexity
A count of the total number of nodes in this tree. |
GPParameters |
gpParameters
The GPParameters used to create this chromosome |
Gene |
treeTop
The Gene at the top of the tree. |
| Constructor Summary | |
(package private) |
Chromosome(GPParameters p,
int adfIndex)
Constructs a new Chromosome using the specified GPParameters. |
| Method Summary | |
int |
complexity()
Calculates the number of nodes in the Gene tree of this Chromosome. |
static Chromosome |
cross(Chromosome mum,
Chromosome dad)
Creates a new child Chromosome via crossover of the mother and father Chromosomes. |
Chromosome |
deepClone()
Makes a deep copy of this Chromsome by making a copy of the entire data graph. |
boolean |
evaluateBoolean(Individual i)
Evaluates the chromosome so that it returns a boolean. |
byte |
evaluateByte(Individual i)
Evaluates the chromosome so that it returns a byte. |
char |
evaluateChar(Individual i)
Evaluates the chromosome so that it returns a char. |
double |
evaluateDouble(Individual i)
Evaluates the chromosome so that it returns a double. |
float |
evaluateFloat(Individual i)
Evaluates the chromosome so that it returns a float. |
int |
evaluateInt(Individual i)
Evaluates the chromosome so that it returns an int. |
long |
evaluateLong(Individual i)
Evaluates the chromosome so that it returns a long. |
java.lang.Object |
evaluateObject(Individual i)
Evaluates the chromosome so that it returns an Object reference. |
short |
evaluateShort(Individual i)
Evaluates the chromosome so that it returns a byte. |
static Chromosome |
mutate(Chromosome mum)
Creates a new child Chromosome which is a mutation of the mother. |
java.lang.String |
toString()
Generates a String representing a dump of the Gene tree for this Chromosome. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public Gene treeTop
Genepublic GPParameters gpParameters
GPParametersint adf
int complexity
| Constructor Detail |
Chromosome(GPParameters p,
int adfIndex)
throws TypeException
p - the GPParameters to use.adfIndex - the index into the adf array in GPParameters
the latter defines ChromosomeParameters for each
adf.| Method Detail |
public static Chromosome mutate(Chromosome mum)
mum - is the mother Chromosome.
public static Chromosome cross(Chromosome mum,
Chromosome dad)
mum - is the mother Chromosome. The child is actually a copy
of the mother with one branch exchanged with a branch from
the father.dad - is the father Chromosome.public Chromosome deepClone()
public int complexity()
public java.lang.Object evaluateObject(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public byte evaluateByte(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public short evaluateShort(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public int evaluateInt(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public long evaluateLong(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public float evaluateFloat(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public double evaluateDouble(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public char evaluateChar(Individual i)
throws EvaluationException
i - is the Individual being evaluated.
public boolean evaluateBoolean(Individual i)
throws EvaluationException
i - is the Individual being evaluated.public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||