|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.NaturalSelector
org.jgap.impl.StandardPostSelector
public class StandardPostSelector
Implementation of a NaturalSelector that is suited for being processed after genetic operators have been executed. It takes all chromosomes with no fitness value computed to the next generation. Then it takes the top n chromosomes from the remaining input into the next generation. Which chromosomes are the best is decided by evaluating their fitness value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jgap.NaturalSelector |
|---|
NaturalSelector.AgeFitnessValueComparator, NaturalSelector.FitnessAgeValueComparator, NaturalSelector.FitnessValueComparator |
| Field Summary |
|---|
| Fields inherited from class org.jgap.NaturalSelector |
|---|
m_config, m_monitor, m_monitorActive |
| Constructor Summary | |
|---|---|
StandardPostSelector()
Default constructor. |
|
StandardPostSelector(Configuration a_config)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
add(IChromosome a_chromosomeToAdd)
Add a Chromosome instance to this selector's working pool of Chromosomes. |
java.lang.Object |
clone()
|
void |
empty()
Empties out the working pool of chromosomes. |
boolean |
equals(java.lang.Object a_o)
|
boolean |
returnsUniqueChromosomes()
|
void |
select(int a_howManyToSelect,
Population a_from_pop,
Population a_to_pop)
Selects a given number of Chromosomes from the pool that will move on to the next generation population. |
| Methods inherited from class org.jgap.NaturalSelector |
|---|
getConfiguration |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StandardPostSelector()
throws InvalidConfigurationException
Attention: The configuration used is the one set with the static method Genotype.setConfiguration.
InvalidConfigurationException
public StandardPostSelector(Configuration a_config)
throws InvalidConfigurationException
a_config - the configuration to use
InvalidConfigurationException| Method Detail |
|---|
protected void add(IChromosome a_chromosomeToAdd)
add in class NaturalSelectora_chromosomeToAdd - the specimen to add to the pool
public void select(int a_howManyToSelect,
Population a_from_pop,
Population a_to_pop)
select in interface INaturalSelectora_from_pop - the population the Chromosomes will be selected froma_to_pop - the population the Chromosomes will be added toa_howManyToSelect - the number of Chromosomes to selectpublic void empty()
empty in interface INaturalSelectorpublic boolean returnsUniqueChromosomes()
returnsUniqueChromosomes in interface INaturalSelectorpublic boolean equals(java.lang.Object a_o)
equals in class java.lang.Objectpublic java.lang.Object clone()
clone in interface ICloneableclone in class java.lang.Object
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||