mss.ea.sel
Class ScoreTournamentSelection
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.sel.Selection
|
+--mss.ea.sel.TournamentSelection
|
+--mss.ea.sel.ScoreTournamentSelection
- All Implemented Interfaces:
- SingleStreamProcessor, StreamProcessor
- public class ScoreTournamentSelection
- extends TournamentSelection
Tournament selection by score.
- Since:
- 0.2.3
- Version:
- $Revision: 1.5 $ $Date: 2001/12/11 13:17:38 $
- Author:
- Andreas Rummler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
scoreComparator
protected ScoreComparator scoreComparator
- Score comparator for use in tournament.
ScoreTournamentSelection
public ScoreTournamentSelection(int numberPerSelection)
- Constructor with number per selection.
- Parameters:
numberPerSelection
- number how many individuals are selected
ScoreTournamentSelection
public ScoreTournamentSelection(int numberPerSelection,
int tourSize)
- Constructor with number per selection and tournament size.
- Parameters:
numberPerSelection
- number how many individuals are selectedtourSize
- size of the tournament
ScoreTournamentSelection
public ScoreTournamentSelection(int numberPerSelection,
int tourSize,
ScoreComparator comp)
- Constructor with number per selection, tournament size and individual comparator.
- Parameters:
numberPerSelection
- number how many individuals are selectedtourSize
- size of the tournamentcomp
- score comparator to use for comparisons
select
public IndividualStream select(IndividualStream is)
throws SelectionException
- Selects individuals from a stream.
- Overrides:
select
in class TournamentSelection
- Parameters:
is
- stream to select individuals from- Returns:
- stream with selected individuals
- Throws:
SelectionException
- thrown in case the selection mechanism fails
selectByScore
protected IndividualStream selectByScore(IndividualStream is)
- Selects individuals by calling the compare() method.
- Parameters:
is
- stream to select individuals from- Returns:
- stream with selected individuals
selectByComparator
protected IndividualStream selectByComparator(IndividualStream is)
- Selects individuals by use of the previously set score comparator.
- Overrides:
selectByComparator
in class TournamentSelection
- Parameters:
is
- stream to select individuals from- Returns:
- stream with selected individuals
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS