stddev test

This commit is contained in:
LPTK 2013-06-13 11:26:15 +02:00
commit aacba6f813
4 changed files with 20 additions and 7 deletions

View file

@ -42,7 +42,7 @@
* From moNeighborhoodStat, to compute the average and the standard deviation of fitness in the neighborhood
*/
template< class Neighbor >
class moStdFitnessNeighborStat : public moStat<typename Neighbor::EOT, double >
class moStdFitnessNeighborStat : public moStat<typename Neighbor::EOT, double>
{
public :
typedef typename Neighbor::EOT EOT ;

View file

@ -4,7 +4,7 @@
#include <mo>
#include <eoFunctor.h> // FIXME: Why don't we use eoFunctorBase on the mother classes
#include "moRealNeighbor.h"
#include "neighbor/moRealNeighbor.h"
template<class Distrib, class Neighbor>
class moRealNeighborhood : public moRndNeighborhood< Neighbor >, public eoFunctorBase

View file

@ -4,6 +4,7 @@
include_directories(${EO_SRC_DIR}/src)
include_directories(${MO_SRC_DIR}/src)
include_directories(${EDO_SRC_DIR}/src)
include_directories(${PROBLEMS_SRC_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
@ -95,10 +96,10 @@ set (TEST_LIST
t-moIndexedVectorTabuList
# t-moRndIndexedVectorTabuList
t-moStdFitnessNeighborStat
t-moStdDevEstimator.cpp
t-moStdDevEstimator
t-moDynSpanCoolingSchedule
t-moTriki.cpp
t-moTrikiReal.cpp
t-moTriki
t-moTrikiReal
)
######################################################################################

View file

@ -2,11 +2,23 @@
// t-moFitnessNeighborStat.cpp
//-----------------------------------------------------------------------------
#include ".h"
#include <eo>
//#include "eoReal.h"
#include "continuator/moStdFitnessNeighborStat.h"
#include "neighborhood/moRealNeighbor.h"
#include "neighborhood/moRealNeighborhood.h"
//-----------------------------------------------------------------------------
typedef eoReal< eoMinimizingFitness > EOT;
typedef moRealNeighbor< EOT > Neighbor;
int main(int ac, char** av)
{
moNeighborhoodStat<Neighbor> nhStat
moStdFitnessNeighborStat<Neighbor> stat(nhStat);
EOT solution(2, 5);
stat(solution);
//assert(stat.value() == 1);
std::cout << "ok " << stat.value() << endl;
}