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

@ -61,6 +61,7 @@ public :
* @param _eval an evaluation function
* @param _neighborComparator a neighbor Comparator
* @param _solNeighborComparator a comparator between a solution and a neighbor
* @param _k number of neighbors visited
*/
moNeighborBestStat(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moNeighborComparator<Neighbor>& _neighborComparator, moSolNeighborComparator<Neighbor>& _solNeighborComparator, unsigned int _k = 0):
moStat<EOT, Fitness>(true, "neighborhood"),

View file

@ -55,12 +55,12 @@ public:
moStat(T _value, std::string _description):
eoValueParam<T>(_value, _description) {}
/**
* @return name of the class
*/
virtual std::string className(void) const {
return "moStat";
}
// /**
// * @return name of the class
// */
// virtual std::string className(void) const {
// return "moStat";
// }
};

View file

@ -56,12 +56,6 @@ public:
*/
virtual void init(EOT &){}
/**
* @return name of the class
*/
virtual std::string className(void) const {
return "moStatBase";
}
};
#endif

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++) {