org.evolvica.core.select
Class PoolSizeTruncationSelector
java.lang.Object
org.evolvica.engine.AbstractOperator
org.evolvica.core.common.AbstractGeneticOperator
org.evolvica.core.select.AbstractSelector
org.evolvica.core.select.TruncationSelector
org.evolvica.core.select.PoolSizeTruncationSelector
- All Implemented Interfaces:
- IGeneticOperator, IOperator, IProcessor, java.io.Serializable
- public class PoolSizeTruncationSelector
- extends TruncationSelector
Truncation selection by fixed percentage.
This operator selects all individuals that are ranked in their
population between 0% and or in other
words it selects the best % of all individuals.
- Since:
- 0.4.0
- Version:
- $Revision: 1.8 $ $Date: 2004/05/26 11:58:17 $
- Author:
- Andreas Rummler
- See Also:
- Serialized Form
Field Summary |
protected float |
threshold
Threshold value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threshold
protected float threshold
- Threshold value.
PoolSizeTruncationSelector
public PoolSizeTruncationSelector()
- Constructor.
The threshold is set to 0.5.
PoolSizeTruncationSelector
public PoolSizeTruncationSelector(int numberPerSelection,
float threshold)
- Constructor number per selection and threshold.
- Parameters:
numberPerSelection
- number how many individuals are selectedthreshold
- threshold percentage
setThreshold
public void setThreshold(float threshold)
throws java.beans.PropertyVetoException
- Sets the threshold.
- Parameters:
threshold
- new threshold
- Throws:
java.beans.PropertyVetoException
- thrown in case the property cannot be set
getThreshold
public float getThreshold()
- Gets the threshold.
- Returns:
- current threshold
threshold
protected int threshold(IIndividual[] pool)
- Description copied from class:
TruncationSelector
- Calculates the truncation threshold.
- Specified by:
threshold
in class TruncationSelector
- Parameters:
pool
- selection pool.
- Returns:
- truncation threshold
- See Also:
TruncationSelector.threshold(org.evolvica.core.IIndividual[])
Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems