public class TournamentSelection extends java.lang.Object implements SelectionPolicy
arity
random
chromosomes without replacement from the population, and then selecting the
fittest chromosome among them.Constructor and Description |
---|
TournamentSelection(int arity)
Creates a new TournamentSelection instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getArity()
Gets the arity (number of chromosomes drawn to the tournament).
|
ChromosomePair |
select(Population population)
Select two chromosomes from the population.
|
void |
setArity(int arity)
Sets the arity (number of chromosomes drawn to the tournament).
|
public TournamentSelection(int arity)
arity
- how many chromosomes will be drawn to the tournamentpublic ChromosomePair select(Population population)
arity
random chromosomes without replacement from the
population, and then selecting the fittest chromosome among them.select
in interface SelectionPolicy
population
- the population from which the chromosomes are choosen.public int getArity()
public void setArity(int arity)
arity
- arity of the tournament"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"