diff --git a/edo/src/edoAlgo.h b/edo/src/edoAlgo.h index b91a5c2a..88ed3d63 100644 --- a/edo/src/edoAlgo.h +++ b/edo/src/edoAlgo.h @@ -40,7 +40,7 @@ template < typename D > class edoAlgo : public eoAlgo< typename D::EOType > { //! Alias for the type - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; // virtual R operator()(A1) = 0; (defined in eoUF) diff --git a/edo/src/edoEDA.h b/edo/src/edoEDA.h index f94e828f..3e02ce64 100644 --- a/edo/src/edoEDA.h +++ b/edo/src/edoEDA.h @@ -46,13 +46,13 @@ class edoEDA : public edoAlgo< D > { public: //! Alias for the type EOT - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; //! Alias for the atom type - typedef typename EOT::AtomType AtomType; + typedef typename EOType::AtomType AtomType; //! Alias for the fitness - typedef typename EOT::Fitness Fitness; + typedef typename EOType::Fitness Fitness; public: @@ -69,12 +69,12 @@ public: \param distribution_continuator Stopping criterion based on the distribution features */ edoEDA ( - eoPopEvalFunc < EOT > & evaluator, - eoSelect< EOT > & selector, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, edoEstimator< D > & estimator, edoSampler< D > & sampler, - eoReplacement< EOT > & replacor, - eoContinue< EOT > & pop_continuator, + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator, edoContinue< D > & distribution_continuator ) : _evaluator(evaluator), @@ -99,12 +99,12 @@ public: \param pop_continuator Stopping criterion based on the population features */ edoEDA ( - eoPopEvalFunc < EOT > & evaluator, - eoSelect< EOT > & selector, + eoPopEvalFunc < EOType > & evaluator, + eoSelect< EOType > & selector, edoEstimator< D > & estimator, edoSampler< D > & sampler, - eoReplacement< EOT > & replacor, - eoContinue< EOT > & pop_continuator + eoReplacement< EOType > & replacor, + eoContinue< EOType > & pop_continuator ) : _evaluator(evaluator), _selector(selector), @@ -123,12 +123,12 @@ public: * \param pop the population of candidate solutions * \return void */ - void operator ()(eoPop< EOT > & pop) + void operator ()(eoPop< EOType > & pop) { assert(pop.size() > 0); - eoPop< EOT > current_pop; - eoPop< EOT > selected_pop; + eoPop< EOType > current_pop; + eoPop< EOType > selected_pop; // FIXME one must instanciate a first distrib here because there is no empty constructor, see if it is possible to instanciate Distributions without parameters D distrib = _estimator(pop); @@ -167,22 +167,22 @@ public: private: //! A full evaluation function. - eoPopEvalFunc < EOT > & _evaluator; + eoPopEvalFunc < EOType > & _evaluator; - //! A EOT selector - eoSelect < EOT > & _selector; + //! A EOType selector + eoSelect < EOType > & _selector; - //! A EOT estimator. It is going to estimate distribution parameters. + //! A EOType estimator. It is going to estimate distribution parameters. edoEstimator< D > & _estimator; //! A D sampler edoSampler< D > & _sampler; - //! A EOT replacor - eoReplacement < EOT > & _replacor; + //! A EOType replacor + eoReplacement < EOType > & _replacor; - //! A EOT population continuator - eoContinue < EOT > & _pop_continuator; + //! A EOType population continuator + eoContinue < EOType > & _pop_continuator; //! A D continuator that always return true edoDummyContinue _dummy_continue; diff --git a/edo/src/edoEDASA.h b/edo/src/edoEDASA.h index b2f0fe70..82880b3c 100644 --- a/edo/src/edoEDASA.h +++ b/edo/src/edoEDASA.h @@ -46,13 +46,13 @@ class edoEDASA : public edoAlgo< D > { public: //! Alias for the type EOT - typedef typename D::EOType EOT; + typedef typename D::EOType EOType; //! Alias for the atom type - typedef typename EOT::AtomType AtomType; + typedef typename EOType::AtomType AtomType; //! Alias for the fitness - typedef typename EOT::Fitness Fitness; + typedef typename EOType::Fitness Fitness; public: @@ -73,18 +73,18 @@ public: \param initial_temperature The initial temperature. \param replacor Population replacor */ - edoEDASA (eoSelect< EOT > & selector, + edoEDASA (eoSelect< EOType > & selector, edoEstimator< D > & estimator, - eoSelectOne< EOT > & selectone, + eoSelectOne< EOType > & selectone, edoModifierMass< D > & modifier, edoSampler< D > & sampler, - eoContinue< EOT > & pop_continue, + eoContinue< EOType > & pop_continue, edoContinue< D > & distribution_continue, - eoEvalFunc < EOT > & evaluation, - moContinuator< moDummyNeighbor > & sa_continue, - moCoolingSchedule & cooling_schedule, + eoEvalFunc < EOType > & evaluation, + moContinuator< moDummyNeighbor > & sa_continue, + moCoolingSchedule & cooling_schedule, double initial_temperature, - eoReplacement< EOT > & replacor + eoReplacement< EOType > & replacor ) : _selector(selector), _estimator(estimator), @@ -108,15 +108,15 @@ public: \param pop A population to improve. \return TRUE. */ - void operator ()(eoPop< EOT > & pop) + void operator ()(eoPop< EOType > & pop) { assert(pop.size() > 0); double temperature = _initial_temperature; - eoPop< EOT > current_pop; + eoPop< EOType > current_pop; - eoPop< EOT > selected_pop; + eoPop< EOType > selected_pop; //------------------------------------------------------------- @@ -165,7 +165,7 @@ public: // Init of a variable contening a point with the bestest fitnesses //------------------------------------------------------------- - EOT current_solution = _selectone(selected_pop); + EOType current_solution = _selectone(selected_pop); //------------------------------------------------------------- @@ -200,7 +200,7 @@ public: do { - EOT candidate_solution = _sampler(distrib); + EOType candidate_solution = _sampler(distrib); _evaluation( candidate_solution ); // TODO: verifier le critere d'acceptation @@ -232,14 +232,14 @@ public: private: - //! A EOT selector - eoSelect < EOT > & _selector; + //! A EOType selector + eoSelect < EOType > & _selector; - //! A EOT estimator. It is going to estimate distribution parameters. + //! A EOType estimator. It is going to estimate distribution parameters. edoEstimator< D > & _estimator; //! SelectOne - eoSelectOne< EOT > & _selectone; + eoSelectOne< EOType > & _selectone; //! A D modifier edoModifierMass< D > & _modifier; @@ -247,26 +247,26 @@ private: //! A D sampler edoSampler< D > & _sampler; - //! A EOT population continuator - eoContinue < EOT > & _pop_continue; + //! A EOType population continuator + eoContinue < EOType > & _pop_continue; //! A D continuator edoContinue < D > & _distribution_continue; //! A full evaluation function. - eoEvalFunc < EOT > & _evaluation; + eoEvalFunc < EOType > & _evaluation; //! Stopping criterion before temperature update - moContinuator< moDummyNeighbor > & _sa_continue; + moContinuator< moDummyNeighbor > & _sa_continue; //! The cooling schedule - moCoolingSchedule & _cooling_schedule; + moCoolingSchedule & _cooling_schedule; //! Initial temperature double _initial_temperature; - //! A EOT replacor - eoReplacement < EOT > & _replacor; + //! A EOType replacor + eoReplacement < EOType > & _replacor; }; #endif // !_edoEDASA_h