|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgap.Specie
Species are reproductively isolated segments of a population. They are used to ensure diversity in the population. This can protect innovation, and also serve to maintain a broader search space, avoiding being trapped in local optima.
Field Summary | |
static java.lang.String |
CHROMOSOME_TAG
XML chromosome tag |
static java.lang.String |
COUNT_TAG
XML count tag |
static java.lang.String |
FITNESS_TAG
XML fitness tag |
static java.lang.String |
ID_TAG
XML ID tag |
static java.lang.String |
SPECIE_TAG
XML base tag |
Constructor Summary | |
Specie(SpeciationParms aSpeciationParms,
Chromosome aRepresentative)
Create new specie from representative. |
Method Summary | |
boolean |
add(Chromosome aChromosome)
|
void |
cull(java.util.Collection keepers)
remove all chromosomes from this specie except keepers |
boolean |
equals(java.lang.Object o)
|
double |
getChromosomeFitnessValue(Chromosome aChromosome)
|
java.util.List |
getChromosomes()
|
double |
getFitnessValue()
|
Chromosome |
getFittest()
|
protected Chromosome |
getRepresentative()
|
java.lang.Long |
getRepresentativeId()
|
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
match(Chromosome aChromosome)
|
java.lang.String |
toString()
|
java.lang.String |
toXml()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SPECIE_TAG
public static final java.lang.String ID_TAG
public static final java.lang.String COUNT_TAG
public static final java.lang.String CHROMOSOME_TAG
public static final java.lang.String FITNESS_TAG
Constructor Detail |
public Specie(SpeciationParms aSpeciationParms, Chromosome aRepresentative)
aSpeciationParms
- aRepresentative
- Method Detail |
public int hashCode()
Object.hashCode()
public boolean equals(java.lang.Object o)
Object.equals(java.lang.Object)
public java.lang.Long getRepresentativeId()
protected Chromosome getRepresentative()
public boolean add(Chromosome aChromosome)
aChromosome
-
public java.util.List getChromosomes()
public void cull(java.util.Collection keepers)
keepers
keepers
- Collection
contains chromosome objectspublic boolean isEmpty()
public double getChromosomeFitnessValue(Chromosome aChromosome)
aChromosome
-
java.lang.IllegalArgumentException
- if chromosome is not a member if this speciepublic double getFitnessValue()
public Chromosome getFittest()
public boolean match(Chromosome aChromosome)
aChromosome
-
aChromosome
public java.lang.String toString()
Object.toString()
public java.lang.String toXml()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |