|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--evSOLve.JEvolution.Population
The Population of JEvolution is designed to possibly be of varying size. It only operates on Individuals, so the finer details are hidden on the population level.
Method Summary | |
void |
addOffspring(evSOLve.JEvolution.Individual individual)
Adds an offspring of the Individual to the Population. |
double |
getFitness(int index)
Gives the fitness of a specific individual. |
evSOLve.JEvolution.Individual |
getIndividual(int index)
Gives specific Individual. |
int |
getSize()
Gives the population size. |
void |
swap(int a,
int b)
Exchanges two Individuals in the Population. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getSize()
public double getFitness(int index)
index
- index of Individual (0 - (size - 1))public evSOLve.JEvolution.Individual getIndividual(int index)
index
- index of Individual (0 - (size - 1))public void addOffspring(evSOLve.JEvolution.Individual individual)
individual
- an Individualpublic void swap(int a, int b)
a
- index of Individual ab
- index of Individual b
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |