public class EpsilonSamplingSelector extends java.lang.Object implements Selector
EpsilonSamplingSelector
implements a selection process based on
the ε-sampling.Modifier and Type | Field and Description |
---|---|
protected ESamplingSurvivorGeneration |
survivorGeneration |
Constructor and Description |
---|
EpsilonSamplingSelector(ESamplingSurvivorGeneration survivorGeneration)
Basic constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<org.opt4j.core.Individual> |
getLames(int lambda,
java.util.Collection<org.opt4j.core.Individual> population)
Selects a subset of
lambda Individual s and returns it as
a new Collection . |
java.util.Collection<org.opt4j.core.Individual> |
getParents(int mu,
java.util.Collection<org.opt4j.core.Individual> population)
Selects a subset of
Individual s and returns it as a new
Collection . |
void |
init(int maxsize)
Sets the maximal number of
Individual s. |
protected final ESamplingSurvivorGeneration survivorGeneration
@Inject public EpsilonSamplingSelector(ESamplingSurvivorGeneration survivorGeneration)
survivorGeneration
- the ESamplingSurvivorGeneration
used for picking the
Individual
s that will survive and act as potential
parentspublic java.util.Collection<org.opt4j.core.Individual> getParents(int mu, java.util.Collection<org.opt4j.core.Individual> population)
Selector
Individual
s and returns it as a new
Collection
. These so called parents can be used to form the next
generation.getParents
in interface Selector
mu
- the number of parents to selectpopulation
- the list of individualspublic java.util.Collection<org.opt4j.core.Individual> getLames(int lambda, java.util.Collection<org.opt4j.core.Individual> population)
Selector
lambda
Individual
s and returns it as
a new Collection
. These individuals can be erased in the next
generation.