00001
00002
00003
00004
00005
00006
00007
00008
00009
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;
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 }
00078
00079 #endif