arity random
chromosomes without replacement from the population, and then selecting the
fittest chromosome among them.
| Modifier and Type | Field and Description |
|---|---|
| private int | arity
number of chromosomes included in the tournament selections |
| Access | Constructor and Description |
|---|---|
| public | TournamentSelection(final int
how many chromosomes will be drawn to the tournament arity)Creates a new TournamentSelection instance. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: arity of the tournamentGets the arity (number of chromosomes drawn to the tournament). |
| public ChromosomePair | Returns: the selected chromosomes.the population from which the chromosomes are chosen. population)Implements org. Select two chromosomes from the population. |
| public void | setArity(final int
arity of the tournament arity)Sets the arity (number of chromosomes drawn to the tournament). |
| private Chromosome | Returns: the selected chromosome.the population from which the chromosomes are chosen. population)Helper for |
| arity | back to summary |
|---|---|
| private int arity number of chromosomes included in the tournament selections | |
| TournamentSelection | back to summary |
|---|---|
| public TournamentSelection(final int arity) Creates a new TournamentSelection instance.
| |
| getArity | back to summary |
|---|---|
| public int getArity() Gets the arity (number of chromosomes drawn to the tournament).
| |
| select | back to summary |
|---|---|
| public ChromosomePair select(final Population population) throws MathIllegalArgumentException Implements org. Select two chromosomes from the population. Each of the two selected
chromosomes is selected based on n-ary tournament -- this is done by
drawing
| |
| setArity | back to summary |
|---|---|
| public void setArity(final int arity) Sets the arity (number of chromosomes drawn to the tournament).
| |
| tournament | back to summary |
|---|---|
| private Chromosome tournament(final ListPopulation population) throws MathIllegalArgumentException Helper for
| |