Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.select
Class TruncationSelector

java.lang.Object
  extended byorg.evolvica.engine.AbstractOperator
      extended byorg.evolvica.core.common.AbstractGeneticOperator
          extended byorg.evolvica.core.select.AbstractSelector
              extended byorg.evolvica.core.select.TruncationSelector
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable
Direct Known Subclasses:
FitnessTruncationSelector, PoolSizeTruncationSelector, ScoreTruncationSelector

public abstract class TruncationSelector
extends AbstractSelector

Abstract base class for a truncation selection. A truncation selection only selects individuals, which have got an attribute above a particular threshold. The threshold can be percentage value, the score or a fitness value. Individuals below the threshold have got the selection probability of 0. Individuals above are selected randomly.

Since:
0.4.0
Version:
$Revision: 1.6 $ $Date: 2004/05/26 11:58:18 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.evolvica.core.select.AbstractSelector
allowMultipleSelection, numberPerSelection
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
TruncationSelector(int numberPerSelection)
          Constructor with number per selection.
 
Method Summary
 IIndividual[] select(IIndividual[] pool)
          Selects individuals out of a given selection pool.
protected abstract  int threshold(IIndividual[] pool)
          Calculates the truncation threshold.
 
Methods inherited from class org.evolvica.core.select.AbstractSelector
getNumberPerSelection, process, setNumberPerSelection
 
Methods inherited from class org.evolvica.engine.AbstractOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.evolvica.engine.IOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 

Constructor Detail

TruncationSelector

public TruncationSelector(int numberPerSelection)
Constructor with number per selection.

Parameters:
numberPerSelection - number how many individuals are selected
Method Detail

select

public IIndividual[] select(IIndividual[] pool)
Description copied from class: AbstractSelector
Selects individuals out of a given selection pool.

Specified by:
select in class AbstractSelector
Parameters:
pool - selection pool
Returns:
selected individuals
See Also:
AbstractSelector.select(org.evolvica.core.IIndividual[])

threshold

protected abstract int threshold(IIndividual[] pool)
Calculates the truncation threshold.

Parameters:
pool - selection pool.
Returns:
truncation threshold

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems