move parser makers to show all help and use explicit dimension_size in bounder init app/eda

This commit is contained in:
Johann Dreo 2012-07-10 15:18:31 +02:00
commit c663ad9230

View file

@ -26,7 +26,7 @@ Authors:
*/ */
#include <eo> #include <eo>
#include <mo> // #include <mo>
#include <eoEvalFuncCounterBounder.h> #include <eoEvalFuncCounterBounder.h>
@ -92,7 +92,7 @@ int main(int ac, char** av)
// Prepare bounder class to set bounds of sampling. // Prepare bounder class to set bounds of sampling.
// This is used by edoSampler. // This is used by edoSampler.
edoBounder< EOT >* bounder = edoBounder< EOT >* bounder =
new edoBounderRng< EOT >( EOT(pop[0].size(), -5), EOT(pop[0].size(), 5), *gen); // FIXME do not use hard-coded bounds new edoBounderRng< EOT >( EOT(dimension_size, -5), EOT(dimension_size, 5), *gen); // FIXME do not use hard-coded bounds
state.storeFunctor(bounder); state.storeFunctor(bounder);
// Prepare sampler class with a specific distribution // Prepare sampler class with a specific distribution
@ -118,6 +118,10 @@ int main(int ac, char** av)
eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size()); eoReplacement< EOT >* replacor = new eoEPReplacement< EOT >(pop.size());
state.storeFunctor(replacor); state.storeFunctor(replacor);
// Help + Verbose routines
make_verbose(parser);
make_help(parser);
// Some stuff to display helper when we are using -h option // Some stuff to display helper when we are using -h option
if (parser.userNeedsHelp()) if (parser.userNeedsHelp())
{ {
@ -125,10 +129,6 @@ int main(int ac, char** av)
exit(1); exit(1);
} }
// Help + Verbose routines
make_verbose(parser);
make_help(parser);
// population output (after helper) // population output (after helper)
// //
// FIXME: theses objects are instanciated there in order to avoid a folder // FIXME: theses objects are instanciated there in order to avoid a folder