GeneralPropagation.h

Go to the documentation of this file.
00001 #ifndef CGENERALPROPAGATION_H
00002 #define CGENERALPROPAGATION_H
00003 #include "GeneralSelect.h"
00004 #include "GeneralPopulation.h"
00005 #include "GeneralRNG.h"
00006 
00007 /** \addtogroup gainv Genetic algorithm optimization */
00008 /* @{ */
00009 
00010 //! The base class for genetic algorithm propagation methods
00011 /*! This class defines the common functionality that is necessary
00012  * to generate a new population from the current generation. The implementation
00013  * details depend on the type of GA and Population encoding and those classes
00014  * have to match to do anything useful. 
00015  */
00016 class GeneralPropagation{
00017 protected:
00018         virtual void Crossover(tpopmember &father, tpopmember &mother);
00019         virtual void Mutation(tpopmember &child);
00020         GeneralSelect* const Select;
00021         GeneralPopulation* const Population;
00022         GeneralRNG* const Random;
00023         double MutationProb;
00024         double CrossoverProb;
00025 public:
00026         virtual void NextGeneration() = 0;
00027         void SetParams(const double mutation, const double crossover){MutationProb = mutation; CrossoverProb = crossover;};
00028         GeneralPropagation(GeneralSelect* const LocalSelect, GeneralPopulation* const LocalPopulation, GeneralRNG* const LocalRandom);
00029         virtual ~GeneralPropagation();
00030         GeneralPropagation(GeneralPropagation &Old);
00031 };
00032 /* @} */
00033 #endif // CGENERALPROPAGATION_H

Generated on Fri Jul 4 15:30:20 2008 for GPLIB++ by  doxygen 1.5.5