All Packages Class Hierarchy This Package Previous Next Index
Interface geneticAlgorithm.Functionable
- public interface Functionable
Functionable interface defines what parameters and what algorithms
each GA problem should supply.
-
abcSize()
- The alpha-bet size.
-
better(double, double)
- Compares two fitnesses and returns true if the first one is better.
-
calc(Ind)
- Receives one individual and returns its fitness.
-
crossOver(Ind, Ind)
- Receives two individuals and returns a child.
-
done()
- Each problem specific finilizing steps.
-
finished(double)
- Returns true if achieved fitness is good enough.
-
generations()
- Number of generations counted by the main loop.
-
indSize()
- returns individuals size
-
maxTrials()
- Maximum number of non-fitness-improving trials that a remote machine should do before stop trying.
-
mutate(Ind)
- Mutates a given individuals.
-
mutationRatio()
- 1/mutationRatio of a population would be mutated.
-
popSize()
- Total population size.
-
start()
- Each problem specific initialization steps.
-
subGenerations()
- Number of fitness improvment steps each remote machine should perform.
-
subPopulations()
- Number of subpopulations.
start
public abstract void start()
- Each problem specific initialization steps.
done
public abstract void done()
- Each problem specific finilizing steps.
indSize
public abstract int indSize()
- returns individuals size
abcSize
public abstract int abcSize()
- The alpha-bet size. Each element value would be in the range 0 - (abcSize - 1).
popSize
public abstract int popSize()
- Total population size. Number of individuals.
generations
public abstract int generations()
- Number of generations counted by the main loop. Sending subpopulation to a remote machine for several subgenerations would be counted as one generation in the main loop.
subPopulations
public abstract int subPopulations()
- Number of subpopulations. Each subpopulation will have popSize/subPopulation individuals.
subGenerations
public abstract int subGenerations()
- Number of fitness improvment steps each remote machine should perform.
maxTrials
public abstract int maxTrials()
- Maximum number of non-fitness-improving trials that a remote machine should do before stop trying.
mutationRatio
public abstract int mutationRatio()
- 1/mutationRatio of a population would be mutated.
finished
public abstract boolean finished(double fitness)
- Returns true if achieved fitness is good enough.
better
public abstract boolean better(double fitness1,
double fitness2)
- Compares two fitnesses and returns true if the first one is better.
calc
public abstract double calc(Ind ind)
- Receives one individual and returns its fitness.
crossOver
public abstract Ind crossOver(Ind oldInd,
Ind ind2)
- Receives two individuals and returns a child.
mutate
public abstract void mutate(Ind ind)
- Mutates a given individuals.
All Packages Class Hierarchy This Package Previous Next Index