Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.select
Class PoolSizeTruncationSelector

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
                  extended byorg.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.
 
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
PoolSizeTruncationSelector()
          Constructor.
PoolSizeTruncationSelector(int numberPerSelection, float threshold)
          Constructor number per selection and threshold.
 
Method Summary
 float getThreshold()
          Gets the threshold.
 void setThreshold(float threshold)
          Sets the threshold.
protected  int threshold(IIndividual[] pool)
          Calculates the truncation threshold.
 
Methods inherited from class org.evolvica.core.select.TruncationSelector
select
 
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
 

Field Detail

threshold

protected float threshold
Threshold value.

Constructor Detail

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 selected
threshold - threshold percentage
Method Detail

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[])

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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