|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.optiloading.Population
public class Population
Population class stores Chromosomes and selects them.
Constructor Summary | |
---|---|
Population()
Construtor initializes the Arraylist |
Method Summary | |
---|---|
void |
addChromosome(Chromosome chrom)
addChromosome method adds a new Chromosome to the population. |
void |
createInitialPopulation()
creatInitialPopulation method creates the initial population |
Population |
elitism(int rate)
Creates a new population; keeping into account the elitism rate. |
Chromosome |
getBestchromosome()
getBestchromosome method for getting the best Chromosome. |
java.util.ArrayList<Chromosome> |
getChromList()
getChromList method for getting the list of Chromosome. |
float |
getTotalfitness()
getTotalfitness method for getting the total fitness. |
Chromosome |
selectRankChromosome()
selectRankChromosome method uses the rank selection for selecting a Chromosome. |
Chromosome |
selectRouletteChromosome()
selectRouletteChromosome method uses the roulette selection for selecting a Chromosome. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Population()
Method Detail |
---|
public Population elitism(int rate)
rate
- Integer value indicating how many chromosomes to copy from original population.public void createInitialPopulation()
public void addChromosome(Chromosome chrom)
chrom
- Chromosome object that is to be added.public float getTotalfitness()
public Chromosome getBestchromosome()
public java.util.ArrayList<Chromosome> getChromList()
public Chromosome selectRouletteChromosome()
public Chromosome selectRankChromosome()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |