| Constructor and Description |
|---|
TournamentSelection()
Default constructor for binary tournament selection.
|
TournamentSelection(int tournamentSize)
Constructor for tournament selection with a given tournament size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doSelect(SubPopulation parents,
SubPopulation offspring)
JEvolution native and default (binary tournaments) selection method.
|
int |
getTournamentSize()
Gives the tournament size tournament size.
|
void |
setTournamentSize(int tournamentSize)
Sets tournament size.
|
public TournamentSelection()
public TournamentSelection(int tournamentSize)
tournamentSize - number of Individuals in a single tournamentpublic int getTournamentSize()
public void setTournamentSize(int tournamentSize)
throws JEvolutionException
tournamentSize - number of Individuals in a single tournamentJEvolutionException - if size < 2public void doSelect(SubPopulation parents, SubPopulation offspring)