EvolvingObjects
eoPopStat< EOT > Class Template Reference

WARNING: this file contains 2 classes: More...

#include <eoPopStat.h>

Inheritance diagram for eoPopStat< EOT >:
eoStat< EOT, std::string > eoValueParam< std::string > eoStatBase< EOT > eoParam eoUF< const eoPop< EOT > &, void > eoFunctorBase unary_function

List of all members.

Public Member Functions

 eoPopStat (unsigned _howMany=0, std::string _desc="")
 default Ctor, void std::string by default, as it appears on the description line once at beginning of evolution.
void operator() (const eoPop< EOT > &_pop)
 Fills the value() of the eoParam with the dump of the population.

Private Attributes

unsigned combien

Detailed Description

template<class EOT>
class eoPopStat< EOT >

WARNING: this file contains 2 classes:

eoPopString and eoSortedPopString

that transform the population into a std::string that can be used to dump to the screen Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. This snippet is a workaround: This class will "print" a whole population into a std::string - that you can later send to any stream This is the plain version - see eoPopString for the Sorted version

Note: this Stat should probably be used only within eoStdOutMonitor, and not inside an eoFileMonitor, as the eoState construct will work much better there.

Definition at line 53 of file eoPopStat.h.


Constructor & Destructor Documentation

template<class EOT >
eoPopStat< EOT >::eoPopStat ( unsigned  _howMany = 0,
std::string  _desc = "" 
) [inline]

default Ctor, void std::string by default, as it appears on the description line once at beginning of evolution.

and is meaningless there. _howMany defaults to 0, that is, the whole population

Definition at line 63 of file eoPopStat.h.


Member Function Documentation

template<class EOT >
void eoPopStat< EOT >::operator() ( const eoPop< EOT > &  _pop) [inline, virtual]

Fills the value() of the eoParam with the dump of the population.

Adds a
before so it does not get mixed up with the rest of the stats that are written by the monitor it is probably used from.

Implements eoUF< const eoPop< EOT > &, void >.

Definition at line 70 of file eoPopStat.h.

References eoValueParam< std::string >::value().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends