JGAP

org.jgap
Class NaturalSelector

java.lang.Object
  extended by org.jgap.NaturalSelector
All Implemented Interfaces:
java.io.Serializable, Configurable, INaturalSelector
Direct Known Subclasses:
NaturalSelectorExt, StandardPostSelector

public abstract class NaturalSelector
extends java.lang.Object
implements INaturalSelector, Configurable

Abstract base implementation of interface INaturalSelector.

Since:
2.0
See Also:
Serialized Form

Nested Class Summary
 class NaturalSelector.AgeFitnessValueComparator
          Comparator regarding first the age (older is better), then the fitness value.
 class NaturalSelector.FitnessAgeValueComparator
          Comparator regarding first the fitness value, then the age (younger is better).
 class NaturalSelector.FitnessValueComparator
          Comparator regarding only the fitness value.
 
Field Summary
protected  Configuration m_config
           
 
Constructor Summary
NaturalSelector()
          Default constructor
NaturalSelector(Configuration a_config)
           
 
Method Summary
protected abstract  void add(IChromosome a_chromosomeToAdd)
          Add a Chromosome instance to this selector's working pool of Chromosomes.
 Configuration getConfiguration()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jgap.INaturalSelector
empty, returnsUniqueChromosomes, select
 

Field Detail

m_config

protected Configuration m_config
Constructor Detail

NaturalSelector

public NaturalSelector()
Default constructor

Since:
3.3.2

NaturalSelector

public NaturalSelector(Configuration a_config)
Parameters:
a_config - the configuration to use
Since:
3.0
Method Detail

getConfiguration

public Configuration getConfiguration()
Returns:
the (immutable) configuration to use
Since:
3.0

add

protected abstract void add(IChromosome a_chromosomeToAdd)
Add a Chromosome instance to this selector's working pool of Chromosomes.

Parameters:
a_chromosomeToAdd - the specimen to add to the pool
Since:
1.0

JGAP