#include <GLStatisticsSingleObjective.h>
Public Member Functions | |
GLStatisticsSingleObjective (const vector< GLBaseGaStatus * > &results) | |
virtual | ~GLStatisticsSingleObjective () |
const pair< const GLBaseFitness *, const GLBaseFitness * > | getMinMaxFitness () const |
const pair< const GLBaseFitness *, const GLBaseFitness * > | getStatFitness () const |
int | getTimesBestFound () const |
virtual ostream & | toStream (ostream &out) const |
Definition at line 14 of file GLStatisticsSingleObjective.h.
GLStatisticsSingleObjective::GLStatisticsSingleObjective | ( | const vector< GLBaseGaStatus * > & | results | ) |
Constructor. Collects all the relevant statistics from the vector of results. Vector should contains the results of multiple runs of the GA with the same parameters. This class collects also results statistics (e.g. average/best fittness value etc.). It assumes, that best organisms which are stored in the vector of results can have fitness function which define methods getSum and getProduct and result of those methods can be returned in GLFitnessSingleObjective<double>.
results | vector of results of GA runs. |
Definition at line 21 of file GLStatisticsSingleObjective.cpp.
GLStatisticsSingleObjective::~GLStatisticsSingleObjective | ( | ) | [virtual] |
Simple destructor.
Definition at line 36 of file GLStatisticsSingleObjective.cpp.
const pair<const GLBaseFitness*, const GLBaseFitness*> GLStatisticsSingleObjective::getMinMaxFitness | ( | ) | const [inline] |
Returns minimum (first) and maximum (second) of the solutions fitness found over all runs.
Definition at line 42 of file GLStatisticsSingleObjective.h.
const pair<const GLBaseFitness*, const GLBaseFitness*> GLStatisticsSingleObjective::getStatFitness | ( | ) | const [inline] |
Returns average (first) and standard deviation (second) of the solutions fitness found over all runs.
Definition at line 52 of file GLStatisticsSingleObjective.h.
int GLStatisticsSingleObjective::getTimesBestFound | ( | ) | const [inline] |
Return in how many runs the best solution was found.
Definition at line 59 of file GLStatisticsSingleObjective.h.
ostream & GLStatisticsSingleObjective::toStream | ( | ostream & | out | ) | const [virtual] |
Prints the statistics.
Reimplemented from GLStatisticsSimple.
Definition at line 119 of file GLStatisticsSingleObjective.cpp.