|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GeneticAlgorithm
The class that runs the cycles of reproduction, evolution and selection,
potentially on multiple Population
s
Field Summary | |
---|---|
static ChangeType |
CROSS_OVER_FUNCTION
|
static ChangeType |
FITNESS_FUNCTION
|
static ChangeType |
FUNCTION
|
static ChangeType |
MUTATION_FUNCTION
|
static ChangeType |
POPULATION
|
static ChangeType |
SELECTION_FUNCTION
|
Method Summary | |
---|---|
CrossOverFunction |
getCrossOverFunction()
|
FitnessFunction |
getFitnessFunction()
Returns the fitness function, i.e. |
int |
getGeneration()
|
MutationFunction |
getMutationFunction()
|
Population |
getPopulation()
The registered Population |
SelectionFunction |
getSelectionFunction()
|
void |
run(GAStoppingCriteria stoppingCriteria)
Iterates the Algorithm until the stopping criteria are met. |
void |
setCrossOverFunction(CrossOverFunction function)
Changes the CrossOverFunction used to CrossOver Chromosomes |
void |
setFitnessFunction(FitnessFunction func)
The fitness function that will be used to compute the fitness of each organism. |
void |
setMutationFunction(MutationFunction function)
Sets the current MutationFunction |
void |
setPopulation(Population pop)
Sets the Population of Organisms to the
Algorithm. |
void |
setSelectionFunction(SelectionFunction function)
Changes the SelectionFunction used to select candidates for
the next generation |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Field Detail |
---|
static final ChangeType FITNESS_FUNCTION
static final ChangeType POPULATION
static final ChangeType FUNCTION
static final ChangeType CROSS_OVER_FUNCTION
static final ChangeType MUTATION_FUNCTION
static final ChangeType SELECTION_FUNCTION
Method Detail |
---|
void setFitnessFunction(FitnessFunction func) throws ChangeVetoException
func
- the FitnessFunction
to be used
ChangeVetoException
- if the change is vetoed.FitnessFunction getFitnessFunction()
void setPopulation(Population pop) throws ChangeVetoException
Population
of Organisms
to the
Algorithm.
pop
- the population to add.
ChangeVetoException
- if new populations are not allowed.Population getPopulation()
Population
Population
being operated on.void setSelectionFunction(SelectionFunction function) throws ChangeVetoException
SelectionFunction
used to select candidates for
the next generation
function
- a SelectionFunction
ChangeVetoException
- if the SelectionFunction
is not allowed to be
changedSelectionFunction getSelectionFunction()
SelectionFunction
void setCrossOverFunction(CrossOverFunction function) throws ChangeVetoException
CrossOverFunction
used to CrossOver Chromosomes
function
- a CrossOverFunction
ChangeVetoException
- if the CrossOverFunction
is not allowed to be
changedCrossOverFunction getCrossOverFunction()
void setMutationFunction(MutationFunction function) throws ChangeVetoException
MutationFunction
function
- a MutationFunction
ChangeVetoException
- if the MutationFunction
change is Vetoed by a
listener.MutationFunction getMutationFunction()
MutationFunction
int getGeneration()
void run(GAStoppingCriteria stoppingCriteria) throws ChangeVetoException, IllegalAlphabetException, IllegalSymbolException
stoppingCriteria
- determines when to stop.
ChangeVetoException
- if the Population being modified is locked
IllegalAlphabetException
- if the MutationFunction chosen attempts to modify a Symbol from
one of the Chromosomes to a Symbol outside of its Alphabet.
IllegalSymbolException
- if the MutationFunction chosen is using the wrong Alphabet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |