public class StochasticUniversalSampling extends java.lang.Object implements SelectionStrategy<HigherOrderMutant>
RouletteWheelSelection
as a fitness-proportionate
selection strategy. Ensures that the frequency of selection for each
candidate is consistent with its expected frequency of selection.Constructor and Description |
---|
StochasticUniversalSampling() |
Modifier and Type | Method and Description |
---|---|
java.util.List<HigherOrderMutant> |
select(Population<HigherOrderMutant> population,
int selectionSize)
Select the specified number of candidates from the population.
|
public java.util.List<HigherOrderMutant> select(Population<HigherOrderMutant> population, int selectionSize)
SelectionStrategy
Select the specified number of candidates from the population. Implementations may assume that the population is sorted in descending order according to fitness (so the fittest individual is the first item in the list).
It is an error to call this method with an empty or null population.
select
in interface SelectionStrategy<HigherOrderMutant>
population
- The Population
from which to select.selectionSize
- The number of individual selections to make.