mss.ea.sel
Class RankingTruncationSelection
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.sel.Selection
|
+--mss.ea.sel.TruncationSelection
|
+--mss.ea.sel.RankingTruncationSelection
- All Implemented Interfaces:
- SingleStreamProcessor, StreamProcessor
- public class RankingTruncationSelection
- extends TruncationSelection
Truncation selection by rank.
This operator selects the best individuals from the population (their rank must be smaller than the given rank).
- Since:
- 0.1
- Version:
- 0.1 (06-03-2001)
- Author:
- Andreas Rummler
Field Summary |
protected int |
threshold
Maximal rank for individuals. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
threshold
protected int threshold
- Maximal rank for individuals.
RankingTruncationSelection
public RankingTruncationSelection(int numberPerSelection)
- Constructor with number per selection.
The threshold is set to 2.
- Parameters:
numberPerSelection
- number how many individuals are selected
RankingTruncationSelection
public RankingTruncationSelection(int numberPerSelection,
int rank)
- Constructor number per selection and threshold.
- Parameters:
numberPerSelection
- number how many individuals are selectedthreshold
- threshold percentage
setThreshold
public void setThreshold(int rank)
- Sets the threshold rank.
In case of an illegal value for rank, the size of the population is assumed.
- Parameters:
rank
- new threshold
getThreshold
public int getThreshold()
- Gets the threshold rank.
- Returns:
- current threshold rank
getThresholdIndex
protected int getThresholdIndex(IndividualStream is)
- Overrides:
getThresholdIndex
in class TruncationSelection
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS