edu.ksu.cis.kdd.ga
Class Subpopulation
java.lang.Object
edu.ksu.cis.kdd.ga.Subpopulation
- public class Subpopulation
- extends java.lang.Object
- Author:
- Roby Joehanes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chromosomes
protected Chromosome[] chromosomes
size
protected int size
op
protected java.util.LinkedList op
opProb
protected java.util.LinkedList opProb
opTotalProb
protected double opTotalProb
opSize
protected int opSize
opCache
protected GAOp[] opCache
opProbCache
protected double[] opProbCache
elitePercentage
protected double elitePercentage
eliteSize
protected int eliteSize
fitness
protected Fitness fitness
constraint
protected Constraint constraint
random
public static final MersenneTwisterFast random
constParam
protected java.lang.Class[] constParam
Subpopulation
public Subpopulation(int size,
Chromosome chrom,
Fitness f)
newGeneration
public void newGeneration()
chooseChromosome
protected Chromosome chooseChromosome()
chooseOperator
protected GAOp chooseOperator()
getBestChromosome
public Chromosome getBestChromosome()
precacheOp
protected void precacheOp()
addOperator
public void addOperator(GAOp op,
double p)
removeOp
public void removeOp(GAOp op)
getElitePercentage
public double getElitePercentage()
- Returns:
- double
setElitePercentage
public void setElitePercentage(double elitePercentage)
- Sets the elitePercentage.
- Parameters:
elitePercentage
- The elitePercentage to set
getFitness
public Fitness getFitness()
- Returns:
- Fitness
setFitness
public void setFitness(Fitness fitness)
- Sets the fitness.
- Parameters:
fitness
- The fitness to set
getConstraint
public Constraint getConstraint()
- Returns:
- Constraint
setConstraint
public void setConstraint(Constraint constraint)
- Sets the constraint.
- Parameters:
constraint
- The constraint to set