T
- The type of evolved entity present in the population
that this data describes.public final class PopulationData<T> extends Object
EvolutionObserver
Constructor and Description |
---|
PopulationData(T bestCandidate,
double bestCandidateFitness,
double meanFitness,
double fitnessStandardDeviation,
boolean naturalFitness,
int populationSize,
int eliteCount,
int generationNumber,
long elapsedTime) |
Modifier and Type | Method and Description |
---|---|
T |
getBestCandidate() |
double |
getBestCandidateFitness() |
long |
getElapsedTime()
Returns the amount of time (in milliseconds) since the
start of the evolutionary algorithm's execution.
|
int |
getEliteCount() |
double |
getFitnessStandardDeviation()
Returns a statistical measure of variation in fitness scores within
the population.
|
int |
getGenerationNumber() |
double |
getMeanFitness()
Returns the average fitness score of population members.
|
int |
getPopulationSize() |
boolean |
isNaturalFitness()
Indicates whether the fitness scores are natural or non-natural.
|
public PopulationData(T bestCandidate, double bestCandidateFitness, double meanFitness, double fitnessStandardDeviation, boolean naturalFitness, int populationSize, int eliteCount, int generationNumber, long elapsedTime)
bestCandidate
- The fittest candidate present in the population.bestCandidateFitness
- The fitness score for the fittest candidate
in the population.meanFitness
- The arithmetic mean of fitness scores for each member
of the population.fitnessStandardDeviation
- A measure of the variation in fitness
scores.naturalFitness
- True if higher fitness scores are better, false
otherwise.populationSize
- The number of individuals in the population.eliteCount
- The number of candidates preserved via elitism.generationNumber
- The (zero-based) number of the last generation
that was processed.elapsedTime
- The number of milliseconds since the start of thepublic T getBestCandidate()
getBestCandidateFitness()
public double getBestCandidateFitness()
getBestCandidateFitness()
public double getMeanFitness()
public double getFitnessStandardDeviation()
public boolean isNaturalFitness()
public int getPopulationSize()
public int getEliteCount()
public int getGenerationNumber()
public long getElapsedTime()