FixMutationFactorStrategy.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2009 by Robot Group Leipzig                        *
00003  *    martius@informatik.uni-leipzig.de                                    *
00004  *    fhesse@informatik.uni-leipzig.de                                     *
00005  *    der@informatik.uni-leipzig.de                                        *
00006  *    guettler@informatik.uni-leipzig.de                                   *
00007  *    jhoffmann@informatik.uni-leipzig.de                                  *
00008  *    joergweide84@aol.com (robot12)                                       *
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  *   This program is distributed in the hope that it will be useful,       *
00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00018  *   GNU General Public License for more details.                          *
00019  *                                                                         *
00020  *   You should have received a copy of the GNU General Public License     *
00021  *   along with this program; if not, write to the                         *
00022  *   Free Software Foundation, Inc.,                                       *
00023  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00024  ***************************************************************************
00025  *                                                                         *
00026  *   This class is a implementation of the IMutationFactorStrategy         *
00027  *   interface. It returns a fix value which is given for the constructor. *
00028  *                                                                         *
00029  *   $Log: FixMutationFactorStrategy.h,v $
00030  *   Revision 1.4  2009/07/21 08:37:59  robot12
00031  *   add some comments
00032  *
00033  *   Revision 1.3  2009/06/17 11:11:06  robot12
00034  *   finishing the mutationfactorstrategy and add some comments.
00035  *
00036  *   Revision 1.2  2009/05/06 13:28:23  robot12
00037  *   some implements... Finish
00038  *
00039  *   Revision 1.1  2009/05/04 15:27:55  robot12
00040  *   rename of some files and moving files to other positions
00041  *    - SingletonGenAlgAPI has one error!!! --> is not ready now
00042  *
00043  *   Revision 1.1  2009/04/29 14:32:29  robot12
00044  *   some implements... Part4
00045  *
00046  *
00047  *
00048  ***************************************************************************/
00049 
00050 #ifndef FIXMUTATIONFACTORSTRATEGY_H_
00051 #define FIXMUTATIONFACTORSTRATEGY_H_
00052 
00053 //includes
00054 #include <vector>
00055 
00056 //forward declaration
00057 class IValue;
00058 class Gen;
00059 
00060 //ga_tools includes
00061 #include "IMutationFactorStrategy.h"
00062 
00063 /**
00064  * This strategy implementation return a fix value for the mutation factor.
00065  */
00066 class FixMutationFactorStrategy : public IMutationFactorStrategy {
00067 public:
00068         /**
00069          * constructor
00070          * @param value (IValue*) the fix Value
00071          */
00072         FixMutationFactorStrategy(IValue* value);
00073 
00074         /**
00075          * default destructor
00076          */
00077         virtual ~FixMutationFactorStrategy();
00078 
00079         /**
00080          * returns the fix value as mutation value
00081          * @param gene (vector<Gen*>) the set of gens -> here not used.
00082          * @return (IValue*) the mutation factor
00083          */
00084         virtual IValue* calcMutationFactor(const std::vector<Gen*>& gene);
00085 
00086 protected:
00087         /**
00088          * the saved fix value which is giving back.
00089          */
00090         IValue* m_value;
00091 
00092 private:
00093         /**
00094          * disable default constructor
00095          */
00096         FixMutationFactorStrategy();
00097 };
00098 
00099 #endif /* FIXMUTATIONFACTORSTRATEGY_H_ */

Generated on Fri Oct 30 16:29:01 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7