eoFileSnapshot(3)

NAME
eoFileSnapshot - Prints snapshots of fitnesses to a (new) file every N generations.

SYNOPSIS

#include <eoFileSnapshot.h>

Inherits eoMonitor.

Inherited by eoFDCFileSnapshot< EOT >, and eoGnuplot1DSnapshot.

  Public Types
typedef std::vector< double > vDouble
typedef eoValueParam< std::vector< double > > vDoubleParam

  Public Member Functions
eoFileSnapshot (std::string _dirname, unsigned _frequency=1, std::string _filename='gen', std::string _delim=' ', unsigned _counter=0, bool _rmFiles=true)
virtual bool hasChanged ()
accessor: has something changed (for gnuplot subclass)
unsigned getCounter ()
accessor to the counter: needed by the gnuplot subclass
std::string getFileName ()
accessor to the current filename: needed by the gnuplot subclass
void setCurrentFileName ()
sets the current filename depending on the counter
eoMonitor & operator() (void)
The operator(void): opens the std::ostream and calls the write method.
eoMonitor & operator() (std::ostream &_os)
The operator(): write on an std::ostream.
virtual const std::string getDirName ()
virtual const std::string baseFileName ()
void add (const eoParam &_param)
add checks whether it is a std::vector of doubles

  Private Attributes
std::string dirname
unsigned frequency
std::string filename
std::string delim
unsigned int counter
std::string currentFileName
bool boolChanged

Detailed Description

Prints snapshots of fitnesses to a (new) file every N generations. Assumes that the parameters that are passed to the monitor (method add in eoMonitor.h) are eoValueParam<std::vector<double> > of same size.

A dir is created and one file per snapshot is created there - so you can later generate a movie!

TODO: The counter is handled internally, but this should be changed so that you can pass e.g. an evalcounter (minor)

I failed to templatize everything so that it can handle eoParam<std::vector<T> > for any type T, simply calling their getValue method ...

Definition at line 53 of file eoFileSnapshot.h.

Author

Generated automatically by Doxygen for EO from the source code.