Ajout du neutral degree, et correction Royal Road

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1790 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2010-05-06 15:13:51 +00:00
commit 1f66526f43
12 changed files with 409 additions and 18 deletions

View file

@ -70,6 +70,20 @@ public :
solNeighborComparator(_solNeighborComparator)
{}
/**
* Default Constructor
* where the comparators are basic, there only compare the fitness values
*
* @param _neighborhood a neighborhood
* @param _eval an evaluation function
*/
moNeighborhoodStat(Neighborhood& _neighborhood, moEval<Neighbor>& _eval):
moStat<EOT, bool>(true, "neighborhood"),
neighborhood(_neighborhood), eval(_eval),
neighborComparator(defaultNeighborComp),
solNeighborComparator(defaultSolNeighborComp)
{}
/**
* Compute classical statistics of the first solution's neighborhood
* @param _solution the first solution
@ -229,6 +243,12 @@ private:
moNeighborComparator<Neighbor>& neighborComparator;
moSolNeighborComparator<Neighbor>& solNeighborComparator;
// default comparators
// compare the fitness values of neighbors: true is strictly greater
moNeighborComparator<Neighbor> defaultNeighborComp;
// compare the fitness values of the solution and the neighbor: true if strictly greater
moSolNeighborComparator<Neighbor> defaultSolNeighborComp;
// the stastics of the fitness
Fitness max, min;
//mean and standard deviation

View file

@ -69,6 +69,16 @@ 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 T>
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), eotParam(NULL)
{
std::cerr << "Sorry the type can not be in a vector of moVectorMonitor" << std::endl;
}
/**
* To test if the value are basic type (double or unsigned int), or EOT type
*