|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgap.NaturalSelector
org.jgap.impl.BestChromosomesSelector
Implementation of a NaturalSelector that takes the top n chromosomes into the next generation. n can be specified. Which chromosomes are the best is decided by evaluating their fitness value
| Constructor Summary | |
BestChromosomesSelector()
Constructor |
|
BestChromosomesSelector(double a_originalRate)
|
|
| Method Summary | |
void |
empty()
Empty out the working pool of Chromosomes. |
boolean |
getDoubletteChromosomesAllowed()
|
double |
getOriginalRate()
|
boolean |
returnsUniqueChromosomes()
|
void |
select(int a_howManyToSelect,
Population a_from_pop,
Population a_to_pop)
Select a given number of Chromosomes from the pool that will move on to the next generation population. |
void |
setDoubletteChromosomesAllowed(boolean a_doublettesAllowed)
Determines whether doublette chromosomes may be added to the selector or will be ignored. |
void |
setOriginalRate(double a_originalRate)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BestChromosomesSelector()
public BestChromosomesSelector(double a_originalRate)
| Method Detail |
public void select(int a_howManyToSelect,
Population a_from_pop,
Population a_to_pop)
a_from_pop - the population the Chromosomes will be selected from.a_to_pop - the population the Chromosomes will be added to.a_howManyToSelect - The number of Chromosomes to select.public void empty()
public void setDoubletteChromosomesAllowed(boolean a_doublettesAllowed)
a_doublettesAllowed - true: doublette chromosomes allowed to be
added to the selector. FALSE: doublettes will be ignored and not
addedpublic boolean getDoubletteChromosomesAllowed()
public boolean returnsUniqueChromosomes()
public void setOriginalRate(double a_originalRate)
a_originalRate - the rate of how many of the original chromosomes
will be selected according to BestChromosomeSelector's strategy. The rest
(non-original) of the chromosomes is addest as duplicatespublic double getOriginalRate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||