alpaqa
1.0.0a10
Nonconvex constrained optimization
|
#include <alpaqa/problem/type-erased-problem.hpp>
Struct containing function pointers to all problem functions (like the objective and constraint functions, with their derivatives, and more).
Some default implementations are available. Internal struct, it is used by TypeErasedProblem.
Definition at line 23 of file type-erased-problem.hpp.
Public Types | |
using | Box = alpaqa::Box< config_t > |
template<class F > | |
using | optional_function_t = util::BasicVTable::optional_function_t< F, ProblemVTable > |
template<class F > | |
using | optional_const_function_t = util::BasicVTable::optional_const_function_t< F, ProblemVTable > |
template<class F > | |
using | required_function_t = typename required_function< F >::type |
A required function includes a void pointer to self, in addition to the arguments of F . | |
template<class F > | |
using | required_const_function_t = typename required_const_function< F >::type |
A required function includes a void pointer to self, in addition to the arguments of F . | |
Public Member Functions | |
template<class P > | |
ProblemVTable (std::in_place_t, P &p) | |
ProblemVTable ()=default | |
Static Public Member Functions | |
static real_t | calc_ŷ_dᵀŷ (const void *self, rvec g_ŷ, crvec y, crvec Σ, const ProblemVTable &vtable) |
static index_t | default_eval_inactive_indices_res_lna (const void *, real_t, crvec, crvec, rindexvec, const ProblemVTable &) |
static void | default_eval_jac_g (const void *, crvec, rindexvec, rindexvec, rvec, const ProblemVTable &) |
static length_t | default_get_jac_g_num_nonzeros (const void *, const ProblemVTable &) |
static void | default_eval_grad_gi (const void *, crvec, index_t, rvec, const ProblemVTable &) |
static void | default_eval_hess_L_prod (const void *, crvec, crvec, real_t, crvec, rvec, const ProblemVTable &) |
static void | default_eval_hess_L (const void *, crvec, crvec, real_t, rindexvec, rindexvec, rvec, const ProblemVTable &) |
static length_t | default_get_hess_L_num_nonzeros (const void *, const ProblemVTable &) |
static void | default_eval_hess_ψ_prod (const void *self, crvec x, crvec y, crvec, real_t scale, crvec v, rvec Hv, const ProblemVTable &vtable) |
static void | default_eval_hess_ψ (const void *self, crvec x, crvec y, crvec, real_t scale, rindexvec inner_idx, rindexvec outer_ptr, rvec H_values, const ProblemVTable &vtable) |
static length_t | default_get_hess_ψ_num_nonzeros (const void *, const ProblemVTable &) |
static real_t | default_eval_f_grad_f (const void *self, crvec x, rvec grad_fx, const ProblemVTable &vtable) |
static real_t | default_eval_f_g (const void *self, crvec x, rvec g, const ProblemVTable &vtable) |
static void | default_eval_grad_f_grad_g_prod (const void *self, crvec x, crvec y, rvec grad_f, rvec grad_gxy, const ProblemVTable &vtable) |
static void | default_eval_grad_L (const void *self, crvec x, crvec y, rvec grad_L, rvec work_n, const ProblemVTable &vtable) |
static real_t | default_eval_ψ (const void *self, crvec x, crvec y, crvec Σ, rvec ŷ, const ProblemVTable &vtable) |
static void | default_eval_grad_ψ (const void *self, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m, const ProblemVTable &vtable) |
static real_t | default_eval_ψ_grad_ψ (const void *self, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m, const ProblemVTable &vtable) |
static const Box & | default_get_box_C (const void *, const ProblemVTable &) |
static const Box & | default_get_box_D (const void *, const ProblemVTable &) |
static void | default_check (const void *, const ProblemVTable &) |
using Box = alpaqa::Box<config_t> |
Definition at line 25 of file type-erased-problem.hpp.
Definition at line 28 of file type-erased-problem.hpp.
Definition at line 30 of file type-erased-problem.hpp.
|
inherited |
A required function includes a void pointer to self, in addition to the arguments of F
.
Definition at line 78 of file type-erasure.hpp.
|
inherited |
A required function includes a void pointer to self, in addition to the arguments of F
.
For const-qualified member functions.
Definition at line 82 of file type-erasure.hpp.
|
inline |
Definition at line 153 of file type-erased-problem.hpp.
|
default |
|
static |
Definition at line 8 of file type-erased-problem.tpp.
|
static |
Definition at line 35 of file type-erased-problem.tpp.
|
static |
Definition at line 42 of file type-erased-problem.tpp.
|
static |
Definition at line 49 of file type-erased-problem.tpp.
|
static |
Definition at line 55 of file type-erased-problem.tpp.
|
static |
Definition at line 61 of file type-erased-problem.tpp.
|
static |
Definition at line 67 of file type-erased-problem.tpp.
|
static |
Definition at line 73 of file type-erased-problem.tpp.
|
static |
Definition at line 79 of file type-erased-problem.tpp.
|
static |
Definition at line 88 of file type-erased-problem.tpp.
|
static |
Definition at line 98 of file type-erased-problem.tpp.
|
static |
Definition at line 106 of file type-erased-problem.tpp.
|
static |
Definition at line 116 of file type-erased-problem.tpp.
|
static |
Definition at line 126 of file type-erased-problem.tpp.
|
static |
Definition at line 137 of file type-erased-problem.tpp.
|
static |
Definition at line 149 of file type-erased-problem.tpp.
|
static |
Definition at line 165 of file type-erased-problem.tpp.
|
static |
Definition at line 181 of file type-erased-problem.tpp.
|
static |
Definition at line 199 of file type-erased-problem.tpp.
|
static |
Definition at line 204 of file type-erased-problem.tpp.
|
static |
Definition at line 209 of file type-erased-problem.tpp.
required_const_function_t<void(crvec z, rvec e)> eval_proj_diff_g |
Definition at line 37 of file type-erased-problem.hpp.
required_const_function_t<void(rvec y, real_t M)> eval_proj_multipliers |
Definition at line 39 of file type-erased-problem.hpp.
required_const_function_t<real_t(real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)> eval_prox_grad_step |
Definition at line 41 of file type-erased-problem.hpp.
required_const_function_t<real_t(crvec x)> eval_f |
Definition at line 43 of file type-erased-problem.hpp.
required_const_function_t<void(crvec x, rvec grad_fx)> eval_grad_f |
Definition at line 45 of file type-erased-problem.hpp.
required_const_function_t<void(crvec x, rvec gx)> eval_g |
Definition at line 47 of file type-erased-problem.hpp.
required_const_function_t<void(crvec x, crvec y, rvec grad_gxy)> eval_grad_g_prod |
Definition at line 49 of file type-erased-problem.hpp.
optional_const_function_t<index_t(real_t γ, crvec x, crvec grad_ψ, rindexvec J)> eval_inactive_indices_res_lna = default_eval_inactive_indices_res_lna |
Definition at line 51 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, rindexvec inner_idx, rindexvec outer_ptr, rvec J_values)> eval_jac_g = default_eval_jac_g |
Definition at line 55 of file type-erased-problem.hpp.
optional_const_function_t<length_t()> get_jac_g_num_nonzeros = default_get_jac_g_num_nonzeros |
Definition at line 57 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, index_t i, rvec grad_gi)> eval_grad_gi = default_eval_grad_gi |
Definition at line 59 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, real_t scale, crvec v, rvec Hv)> eval_hess_L_prod = default_eval_hess_L_prod |
Definition at line 61 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, real_t scale, rindexvec inner_idx, rindexvec outer_ptr, rvec H_values)> eval_hess_L = default_eval_hess_L |
Definition at line 63 of file type-erased-problem.hpp.
optional_const_function_t<length_t()> get_hess_L_num_nonzeros = default_get_hess_L_num_nonzeros |
Definition at line 65 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, crvec Σ, real_t scale, crvec v, rvec Hv)> eval_hess_ψ_prod = default_eval_hess_ψ_prod |
Definition at line 67 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, crvec Σ, real_t scale, rindexvec inner_idx, rindexvec outer_ptr, rvec H_values)> eval_hess_ψ = default_eval_hess_ψ |
Definition at line 69 of file type-erased-problem.hpp.
optional_const_function_t<length_t()> get_hess_ψ_num_nonzeros = default_get_hess_ψ_num_nonzeros |
Definition at line 71 of file type-erased-problem.hpp.
optional_const_function_t<real_t(crvec x, rvec grad_fx)> eval_f_grad_f = default_eval_f_grad_f |
Definition at line 75 of file type-erased-problem.hpp.
optional_const_function_t<real_t(crvec x, rvec g)> eval_f_g = default_eval_f_g |
Definition at line 77 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, rvec grad_f, rvec grad_gxy)> eval_grad_f_grad_g_prod = default_eval_grad_f_grad_g_prod |
Definition at line 79 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, rvec grad_L, rvec work_n)> eval_grad_L = default_eval_grad_L |
Definition at line 83 of file type-erased-problem.hpp.
optional_const_function_t<real_t(crvec x, crvec y, crvec Σ, rvec ŷ)> eval_ψ = default_eval_ψ |
Definition at line 85 of file type-erased-problem.hpp.
optional_const_function_t<void(crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)> eval_grad_ψ = default_eval_grad_ψ |
Definition at line 87 of file type-erased-problem.hpp.
optional_const_function_t<real_t(crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)> eval_ψ_grad_ψ = default_eval_ψ_grad_ψ |
Definition at line 89 of file type-erased-problem.hpp.
optional_const_function_t<const Box &()> get_box_C = default_get_box_C |
Definition at line 93 of file type-erased-problem.hpp.
optional_const_function_t<const Box &()> get_box_D = default_get_box_D |
Definition at line 95 of file type-erased-problem.hpp.
optional_const_function_t<void()> check = default_check |
Definition at line 99 of file type-erased-problem.hpp.
length_t n |
Definition at line 150 of file type-erased-problem.hpp.
length_t m |
Definition at line 150 of file type-erased-problem.hpp.
|
inherited |
Copy-construct a new instance into storage.
Definition at line 95 of file type-erasure.hpp.
|
inherited |
Move-construct a new instance into storage.
Definition at line 97 of file type-erasure.hpp.
|
inherited |
Destruct the given instance.
Definition at line 99 of file type-erasure.hpp.
|
inherited |
The original type of the stored object.
Definition at line 101 of file type-erasure.hpp.