Package io.jenetics

Interface Selector<G extends Gene<?,​G>,​C extends Comparable<? super C>>

    • Method Detail

      • select

        ISeq<Phenotype<G,​C>> select​(Seq<Phenotype<G,​C>> population,
                                          int count,
                                          Optimize opt)
        Select phenotypes from the Population.
        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).
        Throws:
        NullPointerException - if the arguments is null.
        IllegalArgumentException - if the select count is smaller than zero.