|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SelectionFunction
Selects Organisms for Replication and returns the offspring.
| Nested Class Summary | |
|---|---|
static class |
SelectionFunction.SelectAll
|
static class |
SelectionFunction.Threshold
Selects individuals who's fitness exceeds a threshold value. |
| Field Summary | |
|---|---|
static SelectionFunction |
DEFAULT
Selects all members of a population for replication |
static ChangeType |
FITNESS_FUNCTION
|
| Method Summary | |
|---|---|
FitnessFunction |
getFitnessFunction()
|
Population |
select(Population pop,
GeneticAlgorithm genAlg)
Selects a Population of Organisms for
replication based on their fitness. |
void |
setFitnessFunction(FitnessFunction func)
The fitness function that will be used by the select method. |
| Field Detail |
|---|
static final SelectionFunction DEFAULT
static final ChangeType FITNESS_FUNCTION
| Method Detail |
|---|
Population select(Population pop,
GeneticAlgorithm genAlg)
throws ChangeVetoException
Population of Organisms for
replication based on their fitness.
pop - the Population to select from.genAlg - the parent GeneticAlgorithm.
Organisms selected
ChangeVetoException - if the function attempts to change the
population and it is vetoed.
void setFitnessFunction(FitnessFunction func)
throws ChangeVetoException
func - the FitnessFunction to be used
ChangeVetoException - if the change is vetoed.FitnessFunction getFitnessFunction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||