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