|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object evolution.Population
public class Population
Population which is a set of chromosomes
Constructor Summary | |
---|---|
Population()
Create new instance of population. |
Method Summary | |
---|---|
void |
addChromosome(ChromosomeModel tempChromosome)
Add chromosome to the population at the end. |
java.lang.Object |
clone()
Create and return copy of population |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this network. |
ChromosomeModel |
getBestChromosome()
Return reference to chromosome with best fitness function value |
ChromosomeModel |
getChromosome(int index)
Return reference to chromosome specified by index |
int |
getChromosomeSize()
Return size of chromosome |
int |
getPopulationSize()
Return population size |
void |
removeAllChromosome()
Clear population. |
void |
removeChromosome(int index)
Remove chromosome specified by index. |
void |
replaceChromosome(int index,
ChromosomeModel tempChromosome)
Replece chromosome specified by index by chromosome |
java.lang.String |
toString()
Return String representation of population |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Population()
Method Detail |
---|
public int getPopulationSize()
public int getChromosomeSize()
public java.lang.String toString()
toString
in class java.lang.Object
public ChromosomeModel getChromosome(int index)
index
- chromosome index
public void addChromosome(ChromosomeModel tempChromosome)
tempChromosome
- Reference to chromosomepublic void removeAllChromosome()
public void removeChromosome(int index)
index
- index of the chromosomepublic void replaceChromosome(int index, ChromosomeModel tempChromosome)
index
- chromosome which must by replacetempChromosome
- reference to new chromosomepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object to compare with
public ChromosomeModel getBestChromosome()
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |