Class EpsilonSamplingSelector

  • All Implemented Interfaces:
    Selector

    public class EpsilonSamplingSelector
    extends java.lang.Object
    implements Selector
    The EpsilonSamplingSelector implements a selection process based on the ε-sampling.
    • 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 of lambda Individuals 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 Individuals and returns it as a new Collection.
      void init​(int maxsize)
      Sets the maximal number of Individuals.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EpsilonSamplingSelector

        @Inject
        public EpsilonSamplingSelector​(ESamplingSurvivorGeneration survivorGeneration)
        Basic constructor
        Parameters:
        survivorGeneration - the ESamplingSurvivorGeneration used for picking the Individuals 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 of Individuals and returns it as a new Collection. These so called parents can be used to form the next generation.
        Specified by:
        getParents in interface Selector
        Parameters:
        mu - the number of parents to select
        population - 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 of lambda Individuals and returns it as a new Collection. These individuals can be erased in the next generation.
        Specified by:
        getLames in interface Selector
        Parameters:
        lambda - the number of lames to select
        population - the list of individuals
        Returns:
        the worst lambda individuals
      • init

        public void init​(int maxsize)
        Description copied from interface: Selector
        Sets the maximal number of Individuals.
        Specified by:
        init in interface Selector
        Parameters:
        maxsize - the number of individuals