test cleaning
This commit is contained in:
parent
f969590595
commit
78a7932846
1 changed files with 6 additions and 21 deletions
|
|
@ -4,32 +4,21 @@
|
|||
|
||||
#include <eo>
|
||||
#include "es/eoReal.h"
|
||||
#include "continuator/moFitnessVarianceStat.h"
|
||||
#include "neighborhood/moRealNeighbor.h"
|
||||
#include "neighborhood/moRealNeighborhood.h"
|
||||
|
||||
//Representation and initializer
|
||||
#include <eoInt.h>
|
||||
#include <eoInit.h>
|
||||
//#include <eoInit.h>
|
||||
#include <eoScalarFitness.h>
|
||||
|
||||
// fitness function
|
||||
#include <eval/queenEval.h>
|
||||
#include <eval/moFullEvalByModif.h>
|
||||
#include <eval/moFullEvalByCopy.h>
|
||||
|
||||
//Neighbors and Neighborhoods
|
||||
#include <problems/permutation/moShiftNeighbor.h>
|
||||
#include <neighborhood/moRndWithReplNeighborhood.h>
|
||||
|
||||
//Algorithm and its components
|
||||
#include <coolingSchedule/moCoolingSchedule.h>
|
||||
#include <algo/moSA.h>
|
||||
|
||||
//comparator
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
|
||||
|
||||
//Sampling
|
||||
#include <sampling/moStdDevEstimator.h>
|
||||
|
||||
|
||||
|
|
@ -48,18 +37,12 @@ typedef moRealNeighbor< EOT > Neighbor;
|
|||
|
||||
int main(int ac, char** av)
|
||||
{
|
||||
|
||||
|
||||
unsigned vecSize = 8;
|
||||
|
||||
|
||||
queenEval<Queen> fullEval;
|
||||
|
||||
|
||||
eoInitPermutation<Queen> init(vecSize);
|
||||
|
||||
//moFullEvalByCopy<shiftNeighbor> shiftEval(fullEval); /// by default
|
||||
|
||||
rndShiftNeighborhood rndShiftNH((vecSize-1) * (vecSize-1));
|
||||
|
||||
Queen solution;
|
||||
|
|
@ -70,7 +53,9 @@ int main(int ac, char** av)
|
|||
|
||||
moStdDevEstimator<Queen, shiftNeighbor> initTemp (500, rndShiftNH, fullEval);
|
||||
|
||||
double temp = initTemp(solution);
|
||||
|
||||
std::cout << "temp: " << initTemp(solution) << std::endl;
|
||||
//assert(stat.value() == 625);
|
||||
std::cout << "temp: " << temp << std::endl;
|
||||
|
||||
assert(temp >= 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue