CMAState.h

00001 
00002 /*
00003  * C++ification of Nikolaus Hansen's original C-source code for the
00004  * CMA-ES. 
00005  *
00006  * Copyright (C) 1996, 2003, Nikolaus Hansen
00007  *           (C) 2005, Maarten Keijzer
00008  *
00009  * License: LGPL (see source file)
00010  * 
00011  */
00012 
00013 #ifndef CMASTATE_H_
00014 #define CMASTATE_H_
00015 
00016 #include <vector>
00017 #include <valarray>
00018 
00019 namespace eo {
00020     
00021 
00022 class CMAStateImpl;
00023 class CMAParams;
00024 class CMAState {
00025     
00026     CMAStateImpl* pimpl; /* pointer to implementation, hidden in source file */
00027     
00028     public:
00029 
00030     CMAState(const CMAParams&, const std::vector<double>& initial_point, const double initial_sigma = 1.0);
00031     ~CMAState();
00032     CMAState(const CMAState&);
00033     CMAState& operator=(const CMAState&);
00034 
00051     void sample(std::vector<double>& v) const;
00052     
00063     void reestimate(const std::vector<const std::vector<double>* >& sorted_population, double muBest, double muWorst);
00064     
00074     bool updateEigenSystem(unsigned max_tries = 1, unsigned max_iters = 0);  
00075 };
00076 
00077 } // namespace eo
00078 
00079 #endif

Generated on Thu Apr 19 11:02:26 2007 for EO by  doxygen 1.4.7