|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectec.Individual
ec.vector.VectorIndividual
ec.cgp.representation.VectorIndividualCGP
ec.cgp.representation.IntegerVectorIndividual
public class IntegerVectorIndividual
Integer-based genome representation of a Cartesian Genetic Program. Each integer value is restricted to a range that is a function of its position in the genome.
| Field Summary | |
|---|---|
int[] |
genome
the genome |
static java.lang.String |
P_INTEGERVECTORINDIVIDUAL
|
| Fields inherited from class ec.cgp.representation.VectorIndividualCGP |
|---|
expression |
| Fields inherited from class ec.Individual |
|---|
evaluated, EVALUATED_PREAMBLE, fitness, P_INDIVIDUAL, species |
| Constructor Summary | |
|---|---|
IntegerVectorIndividual()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Make a full copy of this individual. |
ec.util.Parameter |
defaultBase()
Returns the default base for this prototype. |
void |
defaultMutate(ec.EvolutionState state,
int thread)
Mutate the genome. |
boolean |
equals(java.lang.Object ind)
Returns true if I am genetically "equal" to ind. |
long |
genomeLength()
Return the genome length |
java.lang.String |
genotypeToStringForHumans()
Generate the human-readable text of the genotype, including the program's expression. |
java.lang.Object |
getGenome()
Get the genome. |
int |
hashCode()
Returns a hashcode for the individual, such that individuals which are equals(...) each other always return the same hash code. |
int |
randomValueFromClosedInterval(int min,
int max,
ec.util.MersenneTwisterFast random)
Taken from IntegerVectorIndividual: Returns a random value from between min and max inclusive. |
void |
reset(ec.EvolutionState state,
int thread)
Initialize individual. |
void |
setGenome(java.lang.Object gen)
Set the genome. |
void |
setup(ec.EvolutionState state,
ec.util.Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
| Methods inherited from class ec.vector.VectorIndividual |
|---|
defaultCrossover, join, reset, setGenomeLength, size, split |
| Methods inherited from class ec.Individual |
|---|
genotypeToString, parseGenotype, printIndividual, printIndividual, printIndividualForHumans, readGenotype, readIndividual, readIndividual, toString, writeGenotype, writeIndividual |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String P_INTEGERVECTORINDIVIDUAL
public int[] genome
| Constructor Detail |
|---|
public IntegerVectorIndividual()
| Method Detail |
|---|
public ec.util.Parameter defaultBase()
ec.Prototype
public java.lang.Object clone()
clone in interface ec.Prototypeclone in class ec.Individual
public void defaultMutate(ec.EvolutionState state,
int thread)
defaultMutate in class ec.vector.VectorIndividual
public void reset(ec.EvolutionState state,
int thread)
reset in class ec.vector.VectorIndividualpublic java.lang.String genotypeToStringForHumans()
genotypeToStringForHumans in class ec.Individualpublic int hashCode()
ec.Individual
hashCode in class ec.Individualpublic boolean equals(java.lang.Object ind)
ec.Individual
equals in class ec.Individual
public int randomValueFromClosedInterval(int min,
int max,
ec.util.MersenneTwisterFast random)
public java.lang.Object getGenome()
getGenome in class VectorIndividualCGPpublic void setGenome(java.lang.Object gen)
setGenome in class ec.vector.VectorIndividualpublic long genomeLength()
genomeLength in class ec.vector.VectorIndividual
public void setup(ec.EvolutionState state,
ec.util.Parameter base)
ec.PrototypeFor prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
setup in interface ec.Prototypesetup in interface ec.Setupsetup in class ec.Individual
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||