Package org.biojavax.ga.functions
Class SelectionFunction.Threshold
- java.lang.Object
-
- org.biojavax.ga.functions.SelectionFunction.Threshold
-
- All Implemented Interfaces:
SelectionFunction
- Enclosing interface:
- SelectionFunction
public static final class SelectionFunction.Threshold extends Object implements SelectionFunction
Selects individuals who's fitness exceeds a threshold value.
- Version:
- 1.0
- Author:
- Mark Schreiber
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojavax.ga.functions.SelectionFunction
SelectionFunction.SelectAll, SelectionFunction.Threshold
-
-
Field Summary
-
Fields inherited from interface org.biojavax.ga.functions.SelectionFunction
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description Threshold(double cutoff)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCutoff()Populationselect(Population pop, GeneticAlgorithm genAlg)Selects individuals whose fitness (as determined by theFitnessFunction) is more than the cutoff.
-
-
-
Constructor Detail
-
Threshold
public Threshold(double cutoff)
-
-
Method Detail
-
getCutoff
public double getCutoff()
-
select
public Population select(Population pop, GeneticAlgorithm genAlg)
Selects individuals whose fitness (as determined by theFitnessFunction) is more than the cutoff. Removes those that aren't.- Specified by:
selectin interfaceSelectionFunction- Parameters:
pop- thePopulationto select from.genAlg- the parentGeneticAlgorithm- Returns:
- the
Populationof selected individuals.
-
-