mss.ea.sel
Class TruncationSelection
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.sel.Selection
|
+--mss.ea.sel.TruncationSelection
- All Implemented Interfaces:
- SingleStreamProcessor, StreamProcessor
- Direct Known Subclasses:
- FitnessTruncationSelection, PercentageTruncationSelection, RankingTruncationSelection, ScoreTruncationSelection
- public abstract class TruncationSelection
- extends Selection
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.1
- Version:
- 0.1 (08-15-2001)
- Author:
- Andreas Rummler
Field Summary |
protected java.util.Random |
rand
Random generator. |
Constructor Summary |
TruncationSelection(int numberPerSelection)
Constructor with number per selection. |
TruncationSelection(int numberPerSelection,
boolean allowMultipleSelection)
Constructor number per selection and multiple selection flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rand
protected java.util.Random rand
- Random generator.
TruncationSelection
public TruncationSelection(int numberPerSelection)
- Constructor with number per selection.
- Parameters:
numberPerSelection
- number how many individuals are selected
TruncationSelection
public TruncationSelection(int numberPerSelection,
boolean allowMultipleSelection)
- Constructor number per selection and multiple selection flag.
- Parameters:
numberPerSelection
- number how many individuals are selectedallowMultipleSelection
- state of the multiple selection flag
select
public IndividualStream select(IndividualStream is)
- Description copied from class:
Selection
- Abstract select method.
Selects individuals. This method depends on the kind of the selection operator and must be implemented
by each subclass. It should be discussed, if this method should be protected.
- Overrides:
select
in class Selection
- Following copied from class:
mss.ea.sel.Selection
- Parameters:
is
- stream of individuals to select from- Returns:
- stream of selected individuals
- Throws:
SelectionException
- thrown in case the selection mechanism fails
getThresholdIndex
protected abstract int getThresholdIndex(IndividualStream is)
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS