Package org.biojavax.ga.functions
Class SelectionFunction.SelectAll
- java.lang.Object
-
- org.biojavax.ga.functions.SelectionFunction.SelectAll
-
- All Implemented Interfaces:
SelectionFunction
- Enclosing interface:
- SelectionFunction
public static final class SelectionFunction.SelectAll extends Object implements SelectionFunction
-
-
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 SelectAll()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FitnessFunctiongetFitnessFunction()Populationselect(Population pop, GeneticAlgorithm genAlg)Selects aPopulationofOrganismsfor replication based on their fitness.voidsetFitnessFunction(FitnessFunction func)
-
-
-
Constructor Detail
-
SelectAll
public SelectAll()
-
-
Method Detail
-
select
public Population select(Population pop, GeneticAlgorithm genAlg)
Description copied from interface:SelectionFunctionSelects aPopulationofOrganismsfor replication based on their fitness.- Specified by:
selectin interfaceSelectionFunction- Parameters:
pop- thePopulationto select from.genAlg- the parentGeneticAlgorithm.- Returns:
- the
Organisms selected
-
getFitnessFunction
public FitnessFunction getFitnessFunction()
- Returns:
- you won't get this far, trust me!
- Throws:
UnsupportedOperationException- as there is noFitnessFunctionfor this class
-
setFitnessFunction
public void setFitnessFunction(FitnessFunction func) throws ChangeVetoException
- Parameters:
func- you could try this but it will throw aChangeVetoException- Throws:
ChangeVetoException- you Cannot set theFitnessFunctionof aSelectAllSelectionFunction"
-
-