12 g_ŷ += (1 / Σ(0)) * y;
14 vtable.eval_proj_diff_g(self,
g_ŷ,
g_ŷ);
21 g_ŷ += Σ.asDiagonal().inverse() * y;
23 vtable.eval_proj_diff_g(self,
g_ŷ,
g_ŷ);
26 for (
index_t i = 0; i < y.size(); ++i) {
91 if (y.size() == 0 && vtable.
eval_hess_L != default_eval_hess_L)
103template <Config Conf>
108 return vtable.eval_f(self, x);
113template <Config Conf>
117 vtable.eval_g(self, x, g);
118 return vtable.eval_f(self, x);
123template <Config Conf>
134template <Config Conf>
146template <Config Conf>
151 return vtable.
eval_f(self, x);
153 auto f = vtable.
eval_f_g(self, x, ŷ, vtable);
154 auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
162template <Config Conf>
170 vtable.
eval_g(self, x, work_m);
171 (
void)calc_ŷ_dᵀŷ(self, work_m, y, Σ, vtable);
172 vtable.
eval_grad_L(self, x, work_m, grad_ψ, work_n, vtable);
178template <Config Conf>
188 auto f = vtable.
eval_f_g(self, x, ŷ, vtable);
189 auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
192 vtable.
eval_grad_L(self, x, ŷ, grad_ψ, work_n, vtable);
197template <Config Conf>
202template <Config Conf>
207template <Config Conf>
@ Upper
Symmetric, upper-triangular part is stored.
typename Conf::real_t real_t
typename Conf::rindexvec rindexvec
typename Conf::index_t index_t
typename Conf::crvec crvec
Struct containing function pointers to all problem functions (like the objective and constraint funct...
required_const_function_t< real_t(crvec x)> eval_f
optional_const_function_t< void(crvec x, crvec y, real_t scale, crvec v, rvec Hv)> eval_hess_L_prod
static real_t default_eval_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec ŷ, const ProblemVTable &vtable)
optional_const_function_t< real_t(crvec x, rvec grad_fx)> eval_f_grad_f
static void default_eval_hess_L_prod(const void *, crvec, crvec, real_t, crvec, rvec, const ProblemVTable &)
optional_const_function_t< void(crvec x, crvec y, rvec grad_L, rvec work_n)> eval_grad_L
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_jac_g(const void *, crvec, rvec, const ProblemVTable &)
optional_const_function_t< real_t(crvec x, rvec g)> eval_f_g
static void default_eval_grad_gi(const void *, crvec, index_t, rvec, const ProblemVTable &)
optional_const_function_t< void(crvec x, crvec y, real_t scale, rvec H_values)> eval_hess_L
static void default_eval_grad_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m, const ProblemVTable &vtable)
required_const_function_t< void(crvec x, rvec gx)> eval_g
static const Box & default_get_box_C(const void *, const ProblemVTable &)
static void default_eval_grad_L(const void *self, crvec x, crvec y, rvec grad_L, rvec work_n, const ProblemVTable &vtable)
static const Box & default_get_box_D(const void *, const ProblemVTable &)
optional_const_function_t< void(crvec x, crvec y, rvec grad_f, rvec grad_gxy)> eval_grad_f_grad_g_prod
static Sparsity default_get_jac_g_sparsity(const void *, const ProblemVTable &)
static void default_eval_hess_ψ(const void *self, crvec x, crvec y, crvec, real_t scale, rvec H_values, const ProblemVTable &vtable)
static real_t default_eval_f_g(const void *self, crvec x, rvec g, const ProblemVTable &vtable)
static index_t default_eval_inactive_indices_res_lna(const void *, real_t, crvec, crvec, rindexvec, const ProblemVTable &)
static void default_check(const void *, const ProblemVTable &)
static void default_eval_hess_L(const void *, crvec, crvec, real_t, rvec, const ProblemVTable &)
static real_t calc_ŷ_dᵀŷ(const void *self, rvec g_ŷ, crvec y, crvec Σ, 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)
required_const_function_t< void(crvec x, crvec y, rvec grad_gxy)> eval_grad_g_prod
static real_t default_eval_f_grad_f(const void *self, crvec x, rvec grad_fx, const ProblemVTable &vtable)
required_const_function_t< void(crvec x, rvec grad_fx)> eval_grad_f
static Sparsity default_get_hess_L_sparsity(const void *, const ProblemVTable &)
static Sparsity default_get_hess_ψ_sparsity(const void *, const ProblemVTable &)
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)
Stores any of the supported sparsity patterns.