mss.ea.sel
Class PercentageTruncationSelection
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.sel.Selection
|
+--mss.ea.sel.TruncationSelection
|
+--mss.ea.sel.PercentageTruncationSelection
- All Implemented Interfaces:
- SingleStreamProcessor, StreamProcessor
- public class PercentageTruncationSelection
- extends TruncationSelection
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. The default percentage is 50%, which is also used,
if an invalid percentage is given.
- Since:
- 0.1
- Version:
- 0.1 (06-03-2001)
- Author:
- Andreas Rummler
Field Summary |
protected java.lang.Float |
threshold
Threshold percentage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
threshold
protected java.lang.Float threshold
- Threshold percentage.
PercentageTruncationSelection
public PercentageTruncationSelection(int numberPerSelection)
- Constructor with number per selection.
The threshold is set to 0.5.
- Parameters:
numberPerSelection
- number how many individuals are selected
PercentageTruncationSelection
public PercentageTruncationSelection(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 t)
- Sets the threshold.
- Parameters:
t
- new threshold
getThreshold
public float getThreshold()
- Gets the threshold.
- Returns:
- current threshold
getThresholdIndex
protected int getThresholdIndex(IndividualStream is)
- Overrides:
getThresholdIndex
in class TruncationSelection
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS