Package io.jenetics

Class MonteCarloSelector<G extends Gene<?,G>,C extends Comparable<? super C>>

java.lang.Object
io.jenetics.MonteCarloSelector<G,C>
All Implemented Interfaces:
Selector<G,C>

public final class MonteCarloSelector<G extends Gene<?,G>,C extends Comparable<? super C>> extends Object implements Selector<G,C>
The Monte Carlo selector selects the individuals from a given population randomly. This selector can be used to measure the performance of another selector. In general, the performance of a selector should be better than the selection performance of the Monte Carlo selector.
Since:
1.0
Version:
5.0
  • Constructor Details

  • Method Details

    • select

      public ISeq<Phenotype<G,C>> select(Seq<Phenotype<G,C>> population, int count, Optimize opt)
      Description copied from interface: Selector
      Select phenotypes from the Population.
      Specified by:
      select in interface Selector<G extends Gene<?,G>,C extends Comparable<? super C>>
      Parameters:
      population - The population to select from.
      count - The number of phenotypes to select.
      opt - Determines whether the individuals with higher fitness values or lower fitness values must be selected. This parameter determines whether the GA maximizes or minimizes the fitness function.
      Returns:
      The selected phenotypes (a new Population).
    • toString

      public String toString()
      Overrides:
      toString in class Object