Package org.opt4j.optimizers.ea.aeseh
Class EpsilonSamplingSelector
- java.lang.Object
-
- org.opt4j.optimizers.ea.aeseh.EpsilonSamplingSelector
-
- All Implemented Interfaces:
Selector
public class EpsilonSamplingSelector extends java.lang.Object implements Selector
TheEpsilonSamplingSelector
implements a selection process based on the ε-sampling.
-
-
Field Summary
Fields Modifier and Type Field Description protected ESamplingSurvivorGeneration
survivorGeneration
-
Constructor Summary
Constructors Constructor Description EpsilonSamplingSelector(ESamplingSurvivorGeneration survivorGeneration)
Basic constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<org.opt4j.core.Individual>
getLames(int lambda, java.util.Collection<org.opt4j.core.Individual> population)
Selects a subset oflambda
Individual
s and returns it as a newCollection
.java.util.Collection<org.opt4j.core.Individual>
getParents(int mu, java.util.Collection<org.opt4j.core.Individual> population)
Selects a subset ofIndividual
s and returns it as a newCollection
.void
init(int maxsize)
Sets the maximal number ofIndividual
s.
-
-
-
Field Detail
-
survivorGeneration
protected final ESamplingSurvivorGeneration survivorGeneration
-
-
Constructor Detail
-
EpsilonSamplingSelector
@Inject public EpsilonSamplingSelector(ESamplingSurvivorGeneration survivorGeneration)
Basic constructor- Parameters:
survivorGeneration
- theESamplingSurvivorGeneration
used for picking theIndividual
s that will survive and act as potential parents
-
-
Method Detail
-
getParents
public java.util.Collection<org.opt4j.core.Individual> getParents(int mu, java.util.Collection<org.opt4j.core.Individual> population)
Description copied from interface:Selector
Selects a subset ofIndividual
s and returns it as a newCollection
. These so called parents can be used to form the next generation.- Specified by:
getParents
in interfaceSelector
- Parameters:
mu
- the number of parents to selectpopulation
- the list of individuals- Returns:
- the parents
-
getLames
public java.util.Collection<org.opt4j.core.Individual> getLames(int lambda, java.util.Collection<org.opt4j.core.Individual> population)
Description copied from interface:Selector
Selects a subset oflambda
Individual
s and returns it as a newCollection
. These individuals can be erased in the next generation.
-
-