Class SelectionFunction.Threshold

    • Constructor Detail

      • Threshold

        public Threshold​(double cutoff)
    • Method Detail

      • select

        public Population select​(Population pop,
                                 GeneticAlgorithm genAlg)
        Selects individuals whose fitness (as determined by the FitnessFunction) is more than the cutoff. Removes those that aren't.
        Specified by:
        select in interface SelectionFunction
        Parameters:
        pop - the Population to select from.
        genAlg - the parent GeneticAlgorithm
        Returns:
        the Population of selected individuals.