test added

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1809 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-12 15:10:32 +00:00
commit c60f80b480
28 changed files with 701 additions and 53 deletions

View file

@ -35,6 +35,7 @@
#ifndef moVectorMonitor_h
#define moVectorMonitor_h
#include <fstream>
#include <utils/eoMonitor.h>
#include <utils/eoParam.h>
@ -69,6 +70,14 @@ public:
moVectorMonitor(eoValueParam<EOT> & _param) : doubleParam(NULL), intParam(NULL), eotParam(&_param)
{ }
/**
* Default Constructor
* @param _param the parameter of type EOT to save in the vector
*/
template <class ScalarType, class Compare>
moVectorMonitor(eoValueParam<eoScalarFitness<ScalarType, Compare> > & _param) : doubleParam( & (eoValueParam<double>&)_param), intParam(NULL), eotParam(NULL)
{ }
/**
* Default Constructor
* @param _param the parameter of type EOT to save in the vector
@ -163,11 +172,11 @@ public:
*/
void fileExport(std::string _filename) {
// create file
ofstream os(_filename.c_str());
std::ofstream os(_filename.c_str());
if (!os) {
string str = "moVectorMonitor: Could not open " + _filename;
throw runtime_error(str);
std::string str = "moVectorMonitor: Could not open " + _filename;
throw std::runtime_error(str);
}
for(unsigned int i = 0; i < size(); i++) {