diff --git a/eo/src/es/eoEsFull.h b/eo/src/es/eoEsFull.h index 92e4ac0c..62f2accc 100644 --- a/eo/src/es/eoEsFull.h +++ b/eo/src/es/eoEsFull.h @@ -53,14 +53,10 @@ public: void printOn(std::ostream& os) const { eoVector::printOn(os); - os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); - os << ' '; - std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os, " ")); - os << ' '; } diff --git a/eo/src/es/eoEsGlobalXover.h b/eo/src/es/eoEsGlobalXover.h index 1743e170..eb2b4330 100644 --- a/eo/src/es/eoEsGlobalXover.h +++ b/eo/src/es/eoEsGlobalXover.h @@ -1,4 +1,4 @@ -/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoEsGlobalXover.h : ES global crossover @@ -8,16 +8,16 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ */ //----------------------------------------------------------------------------- @@ -40,7 +40,7 @@ * Uses some Atom crossovers to handle both the object variables * and the mutation strategy parameters */ -template +template class eoEsGlobalXover: public eoGenOp { public: @@ -68,7 +68,7 @@ public: { // First, select as many parents as you will have offspring EOT& parent = *_plop; // select the first parent - + // first, the object variables for (unsigned i=0; i & _parent, const eoPop >& _pop) { const EOT& realParent1 = sel(_pop); @@ -97,6 +99,10 @@ private: crossMut(_parent.stdev, realParent2.stdev); // apply eoBinOp } + /** Method for cross self-adaptation parameters + + Specialization for eoEsStdev. + */ void cross_self_adapt(eoEsStdev & _parent, const eoPop >& _pop) { for (unsigned i=0; i<_parent.size(); i++) @@ -108,6 +114,10 @@ private: } } + /** Method for cross self-adaptation parameters + + Specialization for eoEsFull. + */ void cross_self_adapt(eoEsFull & _parent, const eoPop >& _pop) { unsigned i; diff --git a/eo/src/es/eoEsStdev.h b/eo/src/es/eoEsStdev.h index 5a3d031d..fac00e49 100644 --- a/eo/src/es/eoEsStdev.h +++ b/eo/src/es/eoEsStdev.h @@ -52,10 +52,8 @@ public: void printOn(std::ostream& os) const { eoVector::printOn(os); - os << ' '; std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); - os << ' '; } @@ -63,7 +61,6 @@ public: { eoVector::readFrom(is); stdevs.resize(size()); - unsigned i; for (i = 0; i < size(); ++i) is >> stdevs[i];