libcmaes
A C++11 library for stochastic optimization with CMA-ES
 All Classes Namespaces Functions Variables Typedefs
pwq_bound_strategy.h
1 
22 #ifndef PWQ_BOUND_STRATEGY_H
23 #define PWQ_BOUND_STRATEGY_H
24 
25 #include "eo_matrix.h"
26 #include <vector>
27 
28 namespace libcmaes
29 {
31  {
32  public:
33  pwqBoundStrategy(); // dummy constructor, required for non-pointer default object in GenoPheno.
34  pwqBoundStrategy(const double *lbounds, const double *ubounds, const int &dim);
35  pwqBoundStrategy(const double *lbounds, const double *ubounds,
36  const double *plbounds, const double *pubounds, const int &dim);
38 
39  void to_f_representation(const dVec &x,
40  dVec &y) const;
41 
42  void to_internal_representation(dVec &x,
43  const dVec &y) const;
44 
45  void shift_into_feasible(const dVec &x, dVec &x_s) const;
46 
47  double getLBound(const int &k) const { return _lbounds[k]; }
48  double getUBound(const int &k) const { return _ubounds[k]; }
49  double getPhenoLBound(const int &k) const { return _phenolbounds[k]; }
50  double getPhenoUBound(const int &k) const { return _phenoubounds[k]; }
51 
52  double getAL(const int &k) const { return _al[k]; }
53  double getAU(const int &k) const { return _au[k]; }
54 
55  void remove_dimensions(const std::vector<int> &k);
56 
57  bool is_id() const
58  {
59  return _id;
60  }
61 
62  private:
63  dVec _lbounds;
64  dVec _ubounds;
65  dVec _al;
66  dVec _au;
67  dVec _xlow;
68  dVec _xup;
69  dVec _r;
70  dVec _phenolbounds;
71  dVec _phenoubounds;
72  bool _id = false;
73  };
74 }
75 
76 #endif
linear scaling of the parameter space to achieve similar sensitivity across all components.
Definition: acovarianceupdate.cc:25
Definition: pwq_bound_strategy.h:30