GLStatisticsSingleObjective Class Reference

#include <GLStatisticsSingleObjective.h>

Inheritance diagram for GLStatisticsSingleObjective:

GLStatisticsSimple

List of all members.

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


Detailed Description

This class collects statistics about fittness values of single objective functions. It is assumed, that fitness functions of organisms supports methods getSum and getProduct and return results in GLFitnessSingleObjective<double>. Note, that this class may refer to data from results set (e.g. best organisms etc.) so it is valid until the results set is destroyed.

Definition at line 14 of file GLStatisticsSingleObjective.h.


Constructor & Destructor Documentation

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>.

Parameters:
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.


Member Function Documentation

const pair<const GLBaseFitness*, const GLBaseFitness*> GLStatisticsSingleObjective::getMinMaxFitness (  )  const [inline]

Returns minimum (first) and maximum (second) of the solutions fitness found over all runs.

Returns:
minimum and maximum of the solution 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.

Returns:
average and standard deviation of the solution 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.

Returns:
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.


The documentation for this class was generated from the following files:

Generated on Sat Jun 13 13:58:12 2009 for GenLib by  doxygen 1.5.9