libcmaes
A C++11 library for stochastic optimization with CMA-ES
 All Classes Namespaces Functions Variables Typedefs
noboundstrategy.h
1 
22 #ifndef NOBOUNDSTRATEGY_H
23 #define NOBOUNDSTRATEGY_H
24 
25 #include "eo_matrix.h"
26 #include <vector>
27 #include <limits>
28 
29 namespace libcmaes
30 {
32  {
33  public:
34  NoBoundStrategy(const double *lbounds=nullptr,const double *ubounds=nullptr,const int dim=0)
35  {
36  (void)lbounds;
37  (void)ubounds;
38  (void)dim;
39  }; // empty constructor with signature.
40 
41  NoBoundStrategy(const double *lbounds,const double *ubounds,
42  const double *plbounds,const double *pubounds,const int dim=0)
43  {
44  (void)lbounds;
45  (void)ubounds;
46  (void)plbounds;
47  (void)pubounds;
48  (void)dim;
49  }; // empty constructor with signature.
50 
51  ~NoBoundStrategy() {};
52 
53  void to_f_representation(const dVec &x, dVec &y) const
54  {
55  (void)x;
56  (void)y;
57  }
58 
59  void remove_dimensions(const std::vector<int> &k)
60  {
61  (void)k;
62  }
63 
64  bool is_id() const
65  {
66  return _id;
67  }
68 
69  double getLBound(const int &k) const { (void)k;return -std::numeric_limits<double>::max(); }
70  double getUBound(const int &k) const { (void)k;return std::numeric_limits<double>::max(); }
71  double getPhenoLBound(const int &k) const { (void)k;return -std::numeric_limits<double>::max(); }
72  double getPhenoUBound(const int &k) const { (void)k;return std::numeric_limits<double>::max(); }
73 
74  private:
75  bool _id = true;
76  };
77 }
78 
79 #endif
Definition: noboundstrategy.h:31
linear scaling of the parameter space to achieve similar sensitivity across all components.
Definition: acovarianceupdate.cc:25