public class ElitismSelector extends Object implements Selector
ElitismSelector is a single objective elitism select. If a
multi-objective problem is optimized, the objectives are summed up to a
single value.| Constructor and Description |
|---|
ElitismSelector(Rand random)
Constructs an
ElitismSelector. |
| Modifier and Type | Method and Description |
|---|---|
Collection<Individual> |
getLames(int lambda,
Collection<Individual> population)
|
Collection<Individual> |
getParents(int mu,
Collection<Individual> population)
Selects a subset of
Individuals and returns it as a new
Collection. |
void |
init(int maxsize)
Sets the maximal number of
Individuals. |
@Inject public ElitismSelector(Rand random)
ElitismSelector.random - the random number generatorpublic Collection<Individual> getLames(int lambda, Collection<Individual> population)
Selectorlambda Individuals and returns it as
a new Collection. These individuals can be erased in the next
generation.public Collection<Individual> getParents(int mu, Collection<Individual> population)
SelectorIndividuals and returns it as a new
Collection. These so called parents can be used to form the next
generation.getParents in interface Selectormu - the number of parents to selectpopulation - the list of individualspublic void init(int maxsize)
SelectorIndividuals.