diff --git a/edo/src/edoBounderBound.h b/edo/src/edoBounderBound.h index 88865a52..3c664624 100644 --- a/edo/src/edoBounderBound.h +++ b/edo/src/edoBounderBound.h @@ -39,27 +39,27 @@ class edoBounderBound : public edoBounder< EOT > { public: edoBounderBound( EOT min, EOT max ) - : edoBounder< EOT >( min, max ) + : edoBounder< EOT >( min, max ) {} void operator()( EOT& x ) { - unsigned int size = x.size(); - assert(size > 0); + unsigned int size = x.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { - if (x[d] < this->min()[d]) - { - x[d] = this->min()[d]; - continue; - } + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { + if (x[d] < this->min()[d]) + { + x[d] = this->min()[d]; + continue; + } - if (x[d] > this->max()[d]) - { - x[d] = this->max()[d]; - } - } + if (x[d] > this->max()[d]) + { + x[d] = this->max()[d]; + } + } } }; diff --git a/edo/src/edoBounderRng.h b/edo/src/edoBounderRng.h index 2db937a2..7b909cca 100644 --- a/edo/src/edoBounderRng.h +++ b/edo/src/edoBounderRng.h @@ -40,24 +40,24 @@ class edoBounderRng : public edoBounder< EOT > { public: edoBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng ) - : edoBounder< EOT >( min, max ), _rng(rng) + : edoBounder< EOT >( min, max ), _rng(rng) {} void operator()( EOT& x ) { - unsigned int size = x.size(); - assert(size > 0); + unsigned int size = x.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) // browse all dimensions - { + for (unsigned int d = 0; d < size; ++d) // browse all dimensions + { - // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. + // FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions. - if (x[d] < this->min()[d] || x[d] > this->max()[d]) - { - x[d] = _rng(); - } - } + if (x[d] < this->min()[d] || x[d] > this->max()[d]) + { + x[d] = _rng(); + } + } } private: diff --git a/edo/src/edoBounderUniform.h b/edo/src/edoBounderUniform.h index 886221a7..a285c8bc 100644 --- a/edo/src/edoBounderUniform.h +++ b/edo/src/edoBounderUniform.h @@ -39,21 +39,21 @@ class edoBounderUniform : public edoBounder< EOT > { public: edoBounderUniform( EOT min, EOT max ) - : edoBounder< EOT >( min, max ) + : edoBounder< EOT >( min, max ) {} void operator()( EOT& sol ) { - unsigned int size = sol.size(); - assert(size > 0); + unsigned int size = sol.size(); + assert(size > 0); - for (unsigned int d = 0; d < size; ++d) { + for (unsigned int d = 0; d < size; ++d) { - if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { - // use EO's global "rng" - sol[d] = rng.uniform( this->min()[d], this->max()[d] ); - } - } // for d in size + if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) { + // use EO's global "rng" + sol[d] = rng.uniform( this->min()[d], this->max()[d] ); + } + } // for d in size } };