alpaqa pantr
Nonconvex constrained optimization
Loading...
Searching...
No Matches
unconstr-problem.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace alpaqa {
6
7template <Config Conf>
9 public:
11 /// Number of constraints
12 length_t get_m() const { return 0; }
13
14 void eval_g(crvec, rvec) const {}
15 void eval_grad_g_prod(crvec, crvec, rvec grad) const { grad.setZero(); }
17 void eval_grad_gi(crvec, index_t, rvec grad_gi) const { grad_gi.setZero(); }
18
19 /// @see @ref TypeErasedProblem::eval_prox_grad_step
20 real_t eval_prox_grad_step(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) const {
21 p = -γ * grad_ψ;
22 x̂ = x + p;
23 return 0;
24 }
25
26 /// @see @ref TypeErasedProblem::eval_proj_diff_g
27 void eval_proj_diff_g(crvec, rvec) const {}
28
29 /// @see @ref TypeErasedProblem::eval_proj_multipliers
31};
32
33} // namespace alpaqa
length_t get_m() const
Number of constraints.
void eval_proj_multipliers(rvec, real_t) const
void eval_grad_gi(crvec, index_t, rvec grad_gi) const
void eval_proj_diff_g(crvec, rvec) const
void eval_g(crvec, rvec) const
real_t eval_prox_grad_step(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) const
void eval_jac_g(crvec, rindexvec, rindexvec, rvec) const
void eval_grad_g_prod(crvec, crvec, rvec grad) const
#define USING_ALPAQA_CONFIG(Conf)
Definition: config.hpp:42
typename Conf::real_t real_t
Definition: config.hpp:51
typename Conf::rindexvec rindexvec
Definition: config.hpp:65
typename Conf::index_t index_t
Definition: config.hpp:63
typename Conf::length_t length_t
Definition: config.hpp:62
typename Conf::rvec rvec
Definition: config.hpp:55
typename Conf::crvec crvec
Definition: config.hpp:56