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