PANOC-ALM  quadratic-penalty
Nonconvex constrained optimization
include/panoc-alm/util/problem.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "box.hpp"
4 
5 #include <functional>
6 #include <memory>
7 #include <type_traits>
8 
9 namespace pa {
10 
24 struct Problem {
25  unsigned int n;
26  unsigned int m;
27  Box C;
28  Box D;
29 
33  using f_sig = real_t(crvec x);
40  using grad_f_sig = void(crvec x, rvec grad_fx);
46  using g_sig = void(crvec x, rvec gx);
57  using grad_g_prod_sig = void(crvec x, crvec y, rvec grad_gxy);
68  using grad_gi_sig = void(crvec x, unsigned i, rvec grad_gi);
81  using hess_L_prod_sig = void(crvec x, crvec y, crvec v, rvec Hv);
90  using hess_L_sig = void(crvec x, crvec y, rmat H);
91 
93  std::function<f_sig> f;
95  std::function<grad_f_sig> grad_f;
97  std::function<g_sig> g;
99  std::function<grad_g_prod_sig> grad_g_prod;
101  std::function<grad_gi_sig> grad_gi;
104  std::function<hess_L_prod_sig> hess_L_prod;
106  std::function<hess_L_sig> hess_L;
107 
108  Problem() = default;
109  Problem(unsigned int n, unsigned int m)
110  : n(n), m(m), C{vec::Constant(n, +inf), vec::Constant(n, -inf)},
111  D{vec::Constant(m, +inf), vec::Constant(m, -inf)} {}
112  Problem(unsigned n, unsigned int m, Box C, Box D, std::function<f_sig> f,
113  std::function<grad_f_sig> grad_f, std::function<g_sig> g,
114  std::function<grad_g_prod_sig> grad_g_prod,
115  std::function<grad_gi_sig> grad_gi,
116  std::function<hess_L_prod_sig> hess_L_prod,
117  std::function<hess_L_sig> hess_L)
118  : n(n), m(m), C(std::move(C)), D(std::move(D)), f(std::move(f)),
119  grad_f(std::move(grad_f)), g(std::move(g)),
120  grad_g_prod(std::move(grad_g_prod)), grad_gi(std::move(grad_gi)),
121  hess_L_prod(std::move(hess_L_prod)), hess_L(std::move(hess_L)) {}
122 };
123 
125  public:
126  using pa::Problem::Problem;
127  void set_param(pa::crvec p) { *param = p; }
128  void set_param(pa::vec &&p) { *param = std::move(p); }
129  pa::vec &get_param() { return *param; }
130  const pa::vec &get_param() const { return *param; }
131  std::shared_ptr<pa::vec> get_param_ptr() const { return param; }
132 
133  private:
134  std::shared_ptr<pa::vec> param = std::make_shared<pa::vec>();
135 };
136 
137 struct EvalCounter {
138  unsigned f = 0;
139  unsigned grad_f = 0;
140  unsigned g = 0;
141  unsigned grad_g_prod = 0;
142  unsigned grad_gi = 0;
143  unsigned hess_L_prod = 0;
144  unsigned hess_L = 0;
145 
146  void reset() { *this = {}; }
147 };
148 
150  a.f += b.f;
151  a.grad_f += b.grad_f;
152  a.g += b.g;
153  a.grad_g_prod += b.grad_g_prod;
154  a.grad_gi += b.grad_gi;
155  a.hess_L_prod += b.hess_L_prod;
156  a.hess_L += b.hess_L;
157  return a;
158 }
159 
160 inline EvalCounter operator+(EvalCounter a, EvalCounter b) { return a += b; }
161 
162 class ProblemWithCounters : public Problem {
163  public:
164  ProblemWithCounters(Problem &&p) : Problem(std::move(p)) {
165  attach_counters(*this);
166  }
168  attach_counters(*this);
169  }
170 
176 
177  public:
179 
180  private:
181  static void attach_counters(ProblemWithCounters &);
182 };
183 
188 class ProblemOnlyD : public Problem {
189  public:
190  ProblemOnlyD(Problem &&p) : original(std::move(p)) { transform(); }
192 
193  private:
194  Problem original; // TODO: Keeping this copy around is unnecessary.
196 
197  void transform();
198 };
199 
213 struct ProblemFull {
214  unsigned int n;
215  unsigned int m1;
216  unsigned int m2;
217  Box C;
218  Box D1;
219  Box D2;
220 
224  using f_sig = real_t(crvec x);
231  using grad_f_sig = void(crvec x, rvec grad_fx);
237  using g1_sig = void(crvec x, rvec g1x);
248  using grad_g1_prod_sig = void(crvec x, crvec y, rvec grad_g1xy);
259  using grad_g1i_sig = void(crvec x, unsigned i, rvec grad_g1i);
266  using g2_sig = void(crvec x, rvec g2x);
277  using grad_g2_prod_sig = void(crvec x, crvec y, rvec grad_g2xy);
288  using grad_g2i_sig = void(crvec x, unsigned i, rvec grad_g2i);
301  using hess_L_prod_sig = void(crvec x, crvec y, crvec v, rvec Hv);
310  using hess_L_sig = void(crvec x, crvec y, rmat H);
311 
313  std::function<f_sig> f;
315  std::function<grad_f_sig> grad_f;
317  std::function<g1_sig> g1;
319  std::function<grad_g1_prod_sig> grad_g1_prod;
321  std::function<grad_g1i_sig> grad_g1i;
323  std::function<g2_sig> g2;
325  std::function<grad_g2_prod_sig> grad_g2_prod;
327  std::function<grad_g2i_sig> grad_g2i;
330  std::function<hess_L_prod_sig> hess_L_prod;
332  std::function<hess_L_sig> hess_L;
333 
334  ProblemFull() = default;
335  ProblemFull(unsigned int n, unsigned int m1, unsigned int m2)
336  : n(n), m1(m1), m2(m2), C{vec::Constant(n, +inf), vec::Constant(n, -inf)},
337  D1{vec::Constant(m1, +inf), vec::Constant(m1, -inf)},
338  D2{vec::Constant(m1, +inf), vec::Constant(m1, -inf)} {}
339  ProblemFull(unsigned n, unsigned int m1, unsigned int m2, Box C, Box D1, Box D2,
340  std::function<f_sig> f,
341  std::function<grad_f_sig> grad_f,
342  std::function<g1_sig> g1,
343  std::function<grad_g1_prod_sig> grad_g1_prod,
344  std::function<grad_g1i_sig> grad_g1i,
345  std::function<g2_sig> g2,
346  std::function<grad_g2_prod_sig> grad_g2_prod,
347  std::function<grad_g2i_sig> grad_g2i,
348  std::function<hess_L_prod_sig> hess_L_prod,
349  std::function<hess_L_sig> hess_L)
350  : n(n), m1(m1), m2(m2), C(std::move(C)), D1(std::move(D1)), D2(std::move(D2)),
351  f(std::move(f)), grad_f(std::move(grad_f)), g1(std::move(g1)),
352  grad_g1_prod(std::move(grad_g1_prod)), grad_g1i(std::move(grad_g1i)),
353  g2(std::move(g2)), grad_g2_prod(std::move(grad_g2_prod)),
354  grad_g2i(std::move(grad_g2i)), hess_L_prod(std::move(hess_L_prod)),
355  hess_L(std::move(hess_L)) {}
356 };
357 
359  public:
361  void set_param(pa::crvec p) { *param = p; }
362  void set_param(pa::vec &&p) { *param = std::move(p); }
363  pa::vec &get_param() { return *param; }
364  const pa::vec &get_param() const { return *param; }
365  std::shared_ptr<pa::vec> get_param_ptr() const { return param; }
366 
367  private:
368  std::shared_ptr<pa::vec> param = std::make_shared<pa::vec>();
369 };
370 
372  unsigned f = 0;
373  unsigned grad_f = 0;
374  unsigned g = 0;
375  unsigned grad_g_prod = 0;
376  unsigned grad_gi = 0;
377  unsigned hess_L_prod = 0;
378  unsigned hess_L = 0;
379 
380  void reset() { *this = {}; }
381 };
382 
384  a.f += b.f;
385  a.grad_f += b.grad_f;
386  a.g += b.g;
387  a.grad_g_prod += b.grad_g_prod;
388  a.grad_gi += b.grad_gi;
389  a.hess_L_prod += b.hess_L_prod;
390  a.hess_L += b.hess_L;
391  return a;
392 }
393 
395 
396 // class ProblemWithCounters : public Problem {
397 // public:
398 // ProblemWithCounters(Problem &&p) : Problem(std::move(p)) {
399 // attach_counters(*this);
400 // }
401 // ProblemWithCounters(const Problem &p) : Problem(p) {
402 // attach_counters(*this);
403 // }
404 
405 // ProblemWithCounters() = delete;
406 // ProblemWithCounters(const ProblemWithCounters &) = delete;
407 // ProblemWithCounters(ProblemWithCounters &&) = delete;
408 // ProblemWithCounters &operator=(const ProblemWithCounters &) = delete;
409 // ProblemWithCounters &operator=(ProblemWithCounters &&) = delete;
410 
411 // public:
412 // EvalCounter evaluations;
413 
414 // private:
415 // static void attach_counters(ProblemWithCounters &);
416 // };
417 
418 // /// Moves the state constraints in the set C to the set D, resulting in an
419 // /// unconstraint inner problem. The new constraints function g becomes the
420 // /// concatenation of the original g function and the identity function. The
421 // /// new set D is the cartesian product of the original D × C.
422 // class ProblemOnlyD : public Problem {
423 // public:
424 // ProblemOnlyD(Problem &&p) : original(std::move(p)) { transform(); }
425 // ProblemOnlyD(const Problem &p) : original(p) { transform(); }
426 
427 // private:
428 // Problem original; // TODO: Keeping this copy around is unnecessary.
429 // vec work;
430 
431 // void transform();
432 // };
433 
434 } // namespace pa
pa::EvalCounterFull::f
unsigned f
Definition: include/panoc-alm/util/problem.hpp:372
pa::ProblemWithCounters::ProblemWithCounters
ProblemWithCounters(Problem &&p)
Definition: include/panoc-alm/util/problem.hpp:164
pa::ProblemWithCounters::ProblemWithCounters
ProblemWithCounters(const ProblemWithCounters &)=delete
pa::ProblemWithParam::get_param
const pa::vec & get_param() const
Definition: include/panoc-alm/util/problem.hpp:130
pa::Problem::hess_L_sig
void(crvec x, crvec y, rmat H) hess_L_sig
Signature of the function that evaluates the Hessian of the Lagrangian .
Definition: include/panoc-alm/util/problem.hpp:90
pa::ProblemFull::D2
Box D2
Quadratic penalty constraints, .
Definition: include/panoc-alm/util/problem.hpp:219
pa::Problem::hess_L_prod_sig
void(crvec x, crvec y, crvec v, rvec Hv) hess_L_prod_sig
Signature of the function that evaluates the Hessian of the Lagrangian multiplied by a vector .
Definition: include/panoc-alm/util/problem.hpp:81
pa::ProblemFull::grad_g2_prod_sig
void(crvec x, crvec y, rvec grad_g2xy) grad_g2_prod_sig
Signature of the function that evaluates the gradient of the quadratic penalty constraints times a ve...
Definition: include/panoc-alm/util/problem.hpp:277
pa::Problem::n
unsigned int n
Number of decision variables, dimension of x.
Definition: include/panoc-alm/util/problem.hpp:25
pa::EvalCounterFull::hess_L_prod
unsigned hess_L_prod
Definition: include/panoc-alm/util/problem.hpp:377
pa::rvec
Eigen::Ref< vec > rvec
Default type for mutable references to vectors.
Definition: vec.hpp:16
pa::Problem::g_sig
void(crvec x, rvec gx) g_sig
Signature of the function that evaluates the constraints .
Definition: include/panoc-alm/util/problem.hpp:46
pa::ProblemFull::g2
std::function< g2_sig > g2
Constraint function .
Definition: include/panoc-alm/util/problem.hpp:323
pa::ProblemOnlyD
Moves the state constraints in the set C to the set D, resulting in an unconstraint inner problem.
Definition: include/panoc-alm/util/problem.hpp:188
pa::ProblemWithCounters::operator=
ProblemWithCounters & operator=(const ProblemWithCounters &)=delete
pa::Problem::grad_f_sig
void(crvec x, rvec grad_fx) grad_f_sig
Signature of the function that evaluates the gradient of the cost function .
Definition: include/panoc-alm/util/problem.hpp:40
pa::ProblemFull::grad_g1i_sig
void(crvec x, unsigned i, rvec grad_g1i) grad_g1i_sig
Signature of the function that evaluates the gradient of one specific ALM constraint .
Definition: include/panoc-alm/util/problem.hpp:259
panocpy.test.y
y
Definition: test.py:76
pa::Problem::D
Box D
Other constraints, .
Definition: include/panoc-alm/util/problem.hpp:28
pa::EvalCounter::f
unsigned f
Definition: include/panoc-alm/util/problem.hpp:138
pa::ProblemWithParam::get_param
pa::vec & get_param()
Definition: include/panoc-alm/util/problem.hpp:129
pa::ProblemWithParam
Definition: include/panoc-alm/util/problem.hpp:124
pa::Problem::hess_L
std::function< hess_L_sig > hess_L
Hessian of the Lagrangian function .
Definition: include/panoc-alm/util/problem.hpp:106
pa::ProblemFull::D1
Box D1
ALM constraints, .
Definition: include/panoc-alm/util/problem.hpp:218
pa::ProblemWithParam::set_param
void set_param(pa::vec &&p)
Definition: include/panoc-alm/util/problem.hpp:128
pa::ProblemWithCounters::ProblemWithCounters
ProblemWithCounters(const Problem &p)
Definition: include/panoc-alm/util/problem.hpp:167
pa::vec
realvec vec
Default type for vectors.
Definition: vec.hpp:14
pa::rmat
Eigen::Ref< mat > rmat
Default type for mutable references to matrices.
Definition: vec.hpp:22
pa::EvalCounterFull
Definition: include/panoc-alm/util/problem.hpp:371
pa::Problem::f
std::function< f_sig > f
Cost function .
Definition: include/panoc-alm/util/problem.hpp:93
box.hpp
pa::ProblemFullWithParam::get_param
const pa::vec & get_param() const
Definition: include/panoc-alm/util/problem.hpp:364
pa::ProblemFull::ProblemFull
ProblemFull()=default
pa::operator+=
InnerStatsAccumulator< PANOCStats > & operator+=(InnerStatsAccumulator< PANOCStats > &acc, const PANOCStats &s)
Definition: inner/decl/panoc.hpp:217
pa::ProblemFull::f_sig
real_t(crvec x) f_sig
Signature of the function that evaluates the cost .
Definition: include/panoc-alm/util/problem.hpp:224
pa::Problem::hess_L_prod
std::function< hess_L_prod_sig > hess_L_prod
Hessian of the Lagrangian function times vector .
Definition: include/panoc-alm/util/problem.hpp:104
pa::Problem::m
unsigned int m
Number of constraints, dimension of g(x) and z.
Definition: include/panoc-alm/util/problem.hpp:26
pa::ProblemFullWithParam::get_param_ptr
std::shared_ptr< pa::vec > get_param_ptr() const
Definition: include/panoc-alm/util/problem.hpp:365
pa::EvalCounterFull::grad_gi
unsigned grad_gi
Definition: include/panoc-alm/util/problem.hpp:376
panocpy.test.v
v
Definition: test.py:42
pa::Problem::grad_gi
std::function< grad_gi_sig > grad_gi
Gradient of a specific constraint .
Definition: include/panoc-alm/util/problem.hpp:101
pa
Definition: alm.hpp:10
panocpy.test.x
x
Definition: test.py:40
pa::ProblemFull::m2
unsigned int m2
Number of quadratic penalty constraints, dimension of g2(x) and z2.
Definition: include/panoc-alm/util/problem.hpp:216
pa::ProblemWithParam::set_param
void set_param(pa::crvec p)
Definition: include/panoc-alm/util/problem.hpp:127
pa::EvalCounter::grad_f
unsigned grad_f
Definition: include/panoc-alm/util/problem.hpp:139
pa::ProblemFull::grad_g1_prod_sig
void(crvec x, crvec y, rvec grad_g1xy) grad_g1_prod_sig
Signature of the function that evaluates the gradient of the ALM constraints times a vector .
Definition: include/panoc-alm/util/problem.hpp:248
pa::ProblemFull::g1_sig
void(crvec x, rvec g1x) g1_sig
Signature of the function that evaluates the ALM constraints .
Definition: include/panoc-alm/util/problem.hpp:237
pa::Problem::grad_g_prod_sig
void(crvec x, crvec y, rvec grad_gxy) grad_g_prod_sig
Signature of the function that evaluates the gradient of the constraints times a vector .
Definition: include/panoc-alm/util/problem.hpp:57
pa::EvalCounter::reset
void reset()
Definition: include/panoc-alm/util/problem.hpp:146
pa::Box
Definition: box.hpp:7
pa::ProblemFull::g2_sig
void(crvec x, rvec g2x) g2_sig
Signature of the function that evaluates the quadratic penalty constraints .
Definition: include/panoc-alm/util/problem.hpp:266
pa::inf
constexpr real_t inf
Definition: vec.hpp:26
pa::ProblemWithCounters::evaluations
EvalCounter evaluations
Definition: include/panoc-alm/util/problem.hpp:178
pa::ProblemFull::grad_g2i_sig
void(crvec x, unsigned i, rvec grad_g2i) grad_g2i_sig
Signature of the function that evaluates the gradient of one specific quadratic penalty constraints .
Definition: include/panoc-alm/util/problem.hpp:288
pa::ProblemFull::ProblemFull
ProblemFull(unsigned n, unsigned int m1, unsigned int m2, Box C, Box D1, Box D2, std::function< f_sig > f, std::function< grad_f_sig > grad_f, std::function< g1_sig > g1, std::function< grad_g1_prod_sig > grad_g1_prod, std::function< grad_g1i_sig > grad_g1i, std::function< g2_sig > g2, std::function< grad_g2_prod_sig > grad_g2_prod, std::function< grad_g2i_sig > grad_g2i, std::function< hess_L_prod_sig > hess_L_prod, std::function< hess_L_sig > hess_L)
Definition: include/panoc-alm/util/problem.hpp:339
pa::Problem::Problem
Problem()=default
pa::ProblemFull::hess_L_prod
std::function< hess_L_prod_sig > hess_L_prod
Hessian of the Lagrangian function times vector .
Definition: include/panoc-alm/util/problem.hpp:330
pa::ProblemFull::f
std::function< f_sig > f
Cost function .
Definition: include/panoc-alm/util/problem.hpp:313
pa::ProblemFull::hess_L_prod_sig
void(crvec x, crvec y, crvec v, rvec Hv) hess_L_prod_sig
Signature of the function that evaluates the Hessian of the Lagrangian multiplied by a vector .
Definition: include/panoc-alm/util/problem.hpp:301
pa::crvec
Eigen::Ref< const vec > crvec
Default type for immutable references to vectors.
Definition: vec.hpp:18
pa::ProblemWithCounters::attach_counters
static void attach_counters(ProblemWithCounters &)
Definition: problem.cpp:5
pa::Problem::grad_f
std::function< grad_f_sig > grad_f
Gradient of the cost function .
Definition: include/panoc-alm/util/problem.hpp:95
pa::ProblemFull::m1
unsigned int m1
Number of ALM constraints, dimension of g1(x) and z1.
Definition: include/panoc-alm/util/problem.hpp:215
pa::ProblemFull::n
unsigned int n
Number of decision variables, dimension of x.
Definition: include/panoc-alm/util/problem.hpp:214
pa::ProblemFull::grad_g1i
std::function< grad_g1i_sig > grad_g1i
Gradient of a specific constraint .
Definition: include/panoc-alm/util/problem.hpp:321
main.b
b
Definition: main.py:11
pa::Problem::Problem
Problem(unsigned n, unsigned int m, Box C, Box D, std::function< f_sig > f, std::function< grad_f_sig > grad_f, std::function< g_sig > g, std::function< grad_g_prod_sig > grad_g_prod, std::function< grad_gi_sig > grad_gi, std::function< hess_L_prod_sig > hess_L_prod, std::function< hess_L_sig > hess_L)
Definition: include/panoc-alm/util/problem.hpp:112
pa::ProblemFull::grad_f_sig
void(crvec x, rvec grad_fx) grad_f_sig
Signature of the function that evaluates the gradient of the cost function .
Definition: include/panoc-alm/util/problem.hpp:231
pa::EvalCounter::g
unsigned g
Definition: include/panoc-alm/util/problem.hpp:140
pa::EvalCounter::grad_g_prod
unsigned grad_g_prod
Definition: include/panoc-alm/util/problem.hpp:141
pa::Problem::grad_g_prod
std::function< grad_g_prod_sig > grad_g_prod
Gradient of the constraint function times vector .
Definition: include/panoc-alm/util/problem.hpp:99
pa::EvalCounter::grad_gi
unsigned grad_gi
Definition: include/panoc-alm/util/problem.hpp:142
pa::ProblemFull::hess_L_sig
void(crvec x, crvec y, rmat H) hess_L_sig
Signature of the function that evaluates the Hessian of the Lagrangian .
Definition: include/panoc-alm/util/problem.hpp:310
pa::ProblemFull::C
Box C
Constraints of the decision variables, .
Definition: include/panoc-alm/util/problem.hpp:217
pa::ProblemWithCounters::ProblemWithCounters
ProblemWithCounters()=delete
pa::ProblemFull::grad_g2i
std::function< grad_g2i_sig > grad_g2i
Gradient of a specific constraint .
Definition: include/panoc-alm/util/problem.hpp:327
pa::EvalCounterFull::reset
void reset()
Definition: include/panoc-alm/util/problem.hpp:380
pa::Problem::f_sig
real_t(crvec x) f_sig
Signature of the function that evaluates the cost .
Definition: include/panoc-alm/util/problem.hpp:33
pa::ProblemWithCounters
Definition: include/panoc-alm/util/problem.hpp:162
pa::EvalCounter::hess_L_prod
unsigned hess_L_prod
Definition: include/panoc-alm/util/problem.hpp:143
pa::ProblemOnlyD::work
vec work
Definition: include/panoc-alm/util/problem.hpp:195
pa::ProblemFullWithParam
Definition: include/panoc-alm/util/problem.hpp:358
pa::ProblemOnlyD::ProblemOnlyD
ProblemOnlyD(const Problem &p)
Definition: include/panoc-alm/util/problem.hpp:191
pa::Problem::g
std::function< g_sig > g
Constraint function .
Definition: include/panoc-alm/util/problem.hpp:97
pa::ProblemFull::grad_g2_prod
std::function< grad_g2_prod_sig > grad_g2_prod
Gradient of the constraint function times vector .
Definition: include/panoc-alm/util/problem.hpp:325
pa::ProblemFull::g1
std::function< g1_sig > g1
Constraint function .
Definition: include/panoc-alm/util/problem.hpp:317
pa::EvalCounterFull::hess_L
unsigned hess_L
Definition: include/panoc-alm/util/problem.hpp:378
pa::EvalCounter::hess_L
unsigned hess_L
Definition: include/panoc-alm/util/problem.hpp:144
pa::EvalCounterFull::g
unsigned g
Definition: include/panoc-alm/util/problem.hpp:374
pa::ProblemWithCounters::ProblemWithCounters
ProblemWithCounters(ProblemWithCounters &&)=delete
pa::ProblemFull::grad_f
std::function< grad_f_sig > grad_f
Gradient of the cost function .
Definition: include/panoc-alm/util/problem.hpp:315
pa::Problem::grad_gi_sig
void(crvec x, unsigned i, rvec grad_gi) grad_gi_sig
Signature of the function that evaluates the gradient of one specific constraints .
Definition: include/panoc-alm/util/problem.hpp:68
pa::EvalCounterFull::grad_g_prod
unsigned grad_g_prod
Definition: include/panoc-alm/util/problem.hpp:375
panocpy.test.p
p
Definition: test.py:57
pa::ProblemWithParam::get_param_ptr
std::shared_ptr< pa::vec > get_param_ptr() const
Definition: include/panoc-alm/util/problem.hpp:131
pa::ProblemFull
Problem description for minimization problems.
Definition: include/panoc-alm/util/problem.hpp:213
pa::ProblemFullWithParam::get_param
pa::vec & get_param()
Definition: include/panoc-alm/util/problem.hpp:363
pa::EvalCounterFull::grad_f
unsigned grad_f
Definition: include/panoc-alm/util/problem.hpp:373
pa::ProblemFullWithParam::param
std::shared_ptr< pa::vec > param
Definition: include/panoc-alm/util/problem.hpp:368
pa::ProblemWithParam::param
std::shared_ptr< pa::vec > param
Definition: include/panoc-alm/util/problem.hpp:134
pa::ProblemOnlyD::ProblemOnlyD
ProblemOnlyD(Problem &&p)
Definition: include/panoc-alm/util/problem.hpp:190
pa::real_t
double real_t
Default floating point type.
Definition: vec.hpp:8
pa::ProblemOnlyD::transform
void transform()
Definition: problem.cpp:39
pa::ProblemOnlyD::original
Problem original
Definition: include/panoc-alm/util/problem.hpp:194
pa::ProblemFull::hess_L
std::function< hess_L_sig > hess_L
Hessian of the Lagrangian function .
Definition: include/panoc-alm/util/problem.hpp:332
pa::ProblemFull::ProblemFull
ProblemFull(unsigned int n, unsigned int m1, unsigned int m2)
Definition: include/panoc-alm/util/problem.hpp:335
pa::ProblemWithCounters::operator=
ProblemWithCounters & operator=(ProblemWithCounters &&)=delete
pa::operator+
EvalCounter operator+(EvalCounter a, EvalCounter b)
Definition: include/panoc-alm/util/problem.hpp:160
pa::ProblemFullWithParam::set_param
void set_param(pa::vec &&p)
Definition: include/panoc-alm/util/problem.hpp:362
pa::Problem
Problem description for minimization problems.
Definition: include/panoc-alm/util/problem.hpp:24
main.H
H
Definition: main.py:8
pa::Problem::C
Box C
Constraints of the decision variables, .
Definition: include/panoc-alm/util/problem.hpp:27
pa::Problem::Problem
Problem(unsigned int n, unsigned int m)
Definition: include/panoc-alm/util/problem.hpp:109
pa::ProblemFullWithParam::set_param
void set_param(pa::crvec p)
Definition: include/panoc-alm/util/problem.hpp:361
pa::ProblemFull::grad_g1_prod
std::function< grad_g1_prod_sig > grad_g1_prod
Gradient of the constraint function times vector .
Definition: include/panoc-alm/util/problem.hpp:319
pa::EvalCounter
Definition: include/panoc-alm/util/problem.hpp:137