|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGeneticAlgorithm
Defines methods required by genetic algorithms.
Method Summary | |
---|---|
double |
getCrossoverFraction()
Return the crossover fraction. |
CrossoverType |
getCrossoverType()
Return the crossover type. |
long |
getElapsedTime()
Return the elapsed time. |
int |
getGeneration()
Return the number of generations run. |
IChromosome |
getMostFit()
Return the most fit chromosome. |
double |
getMutationFraction()
|
double |
getMutationMagnitude()
Return the mutation magnitude. |
double |
getMutationRate()
Return the mutation rate. |
int |
getPopulationSize()
Return the population size. |
double |
getProcessingRate()
Return the processing rate. |
void |
reset()
Reset. |
int |
runGenerations(int numGenerations,
int printFrequency)
Run for the given number of generations. |
void |
setAverageCrossoverFraction(double averageCrossoverFraction)
|
void |
setCrossoverFraction(double crossoverFraction)
Set the crossover fraction. |
void |
setCrossoverType(CrossoverType crossoverType)
Set the crossover type. |
void |
setDuplicateAllowed(boolean isDuplicateAllowed)
Set the flag indicating whether duplicate chromosomes are allowed. |
void |
setMutationFraction(double mutationFraction)
|
void |
setMutationMagnitude(double mutationMagnitude)
Set the mutation magnitude. |
void |
setMutationRate(double mutationRate)
Set the mutation rate. |
void |
setPopulationSize(int size)
Set the population size. |
void |
writeReport()
Write a report. |
Method Detail |
---|
double getCrossoverFraction()
CrossoverType getCrossoverType()
long getElapsedTime()
int getGeneration()
IChromosome getMostFit()
double getMutationFraction()
double getMutationMagnitude()
double getMutationRate()
int getPopulationSize()
double getProcessingRate()
void reset()
int runGenerations(int numGenerations, int printFrequency)
numGenerations
- Number of generations to run.printFrequency
- Print frequency.void setAverageCrossoverFraction(double averageCrossoverFraction)
averageCrossoverFraction
- The averageCrossoverFraction to set.void setCrossoverFraction(double crossoverFraction)
crossoverFraction
- Number of chromosomes to form from crossover
of the retained ones as a fraction of the
population size.void setCrossoverType(CrossoverType crossoverType)
void setDuplicateAllowed(boolean isDuplicateAllowed)
void setMutationFraction(double mutationFraction)
mutationFraction
- the mutationFraction to setvoid setMutationMagnitude(double mutationMagnitude)
mutationMagnitude
- The maximum allowed magnitude of the mutation.void setMutationRate(double mutationRate)
mutationRate
- Probability of a gene being mutated.void setPopulationSize(int size)
void writeReport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |