📄 mutationcmafltvecop.hpp
字号:
/* * Open BEAGLE * Copyright (C) 2001-2005 by Christian Gagne and Marc Parizeau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 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: * Laboratoire de Vision et Systemes Numeriques * Departement de genie electrique et de genie informatique * Universite Laval, Quebec, Canada, G1K 7P4 * http://vision.gel.ulaval.ca * *//*! * \file beagle/GA/MutationCMAFltVecOp.hpp * \brief Definition of the class GA::MutationCMAFltVecOp. * \author Christian Gagne * \author Marc Parizeau * $Revision: 1.5 $ * $Date: 2005/09/30 15:04:53 $ */#ifndef Beagle_GA_MutationCMAFltVecOp_hpp#define Beagle_GA_MutationCMAFltVecOp_hpp#include <string>#include "beagle/config.hpp"#include "beagle/macros.hpp"#include "beagle/Object.hpp"#include "beagle/MutationOp.hpp"namespace Beagle {namespace GA {/*! * \class MutationCMAFltVecOp beagle/GA/MutationCMAFltVecOp.hpp * "beagle/GA/MutationCMAFltVecOp.hpp" * \brief CMA-ES float vector mutation operator class. * \ingroup GAF * \ingroup GAFV * * This mutation operator is intended to be used in a breeder tree in conjunction of the * GA::MuWCommaLambdaCMAFltVecOp replacement strategy. The parameters of the mutation * are adaptively modified by this replacement strategy following the CMA-ES algorithm. * * Reference: Hansen, N. and Ostermeier, A. (2001). Completely Derandomized Self-Adaptation * in Evolution Strategies. Evolutionary Computation, 9(2), pp. 159-195. * See also: http://www.bionik.tu-berlin.de/user/niko/cmaes_inmatlab.html */class MutationCMAFltVecOp : public Beagle::MutationOp {public: //! GA::MutationCMAFltVecOp allocator type. typedef AllocatorT<MutationCMAFltVecOp,Beagle::MutationOp::Alloc> Alloc; //! GA::MutationCMAFltVecOp handle type. typedef PointerT<MutationCMAFltVecOp,Beagle::MutationOp::Handle> Handle; //! GA::MutationCMAFltVecOp bag type. typedef ContainerT<MutationCMAFltVecOp,Beagle::MutationOp::Bag> Bag; explicit MutationCMAFltVecOp(string inMutationPbName="ga.cmaes.mutpb", string inName="GA-MutationCMAFltVecOp"); virtual ~MutationCMAFltVecOp() { } virtual void initialize(System& ioSystem); virtual bool mutate(Beagle::Individual& ioIndividual, Context& ioContext);protected: Matrix::Handle mB; //!< CMA-ES B matrix. Vector::Handle mD; //!< CMA-ES D vector. Double::Handle mSigma; //!< CMA-ES sigma value. DoubleArray::Handle mMaxValue; //!< Max value of GA float vectors. DoubleArray::Handle mMinValue; //!< Min value of GA float vectors.};}}#endif // Beagle_GA_MutationCMAFltVecOp_hpp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -