12 g_ŷ += (1 / Σ(0)) * y;
14 vtable.eval_proj_diff_g(self,
g_ŷ,
g_ŷ);
21 g_ŷ += y.cwiseQuotient(Σ);
23 vtable.eval_proj_diff_g(self,
g_ŷ,
g_ŷ);
26 for (
index_t i = 0; i < y.size(); ++i) {
91 if (vtable.
m == 0 && vtable.
eval_hess_L != default_eval_hess_L)
99 if (vtable.m == 0 && vtable.get_hess_L_sparsity != default_get_hess_L_sparsity)
100 return vtable.get_hess_L_sparsity(self, vtable);
105template <Config Conf>
110 return vtable.eval_f(self, x);
115template <Config Conf>
119 vtable.eval_g(self, x, g);
120 return vtable.eval_f(self, x);
125template <Config Conf>
136template <Config Conf>
148template <Config Conf>
153 return vtable.
eval_f(self, x);
155 auto f = vtable.
eval_f_g(self, x, ŷ, vtable);
156 auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
164template <Config Conf>
172 vtable.
eval_g(self, x, work_m);
173 (
void)calc_ŷ_dᵀŷ(self, work_m, y, Σ, vtable);
174 vtable.
eval_grad_L(self, x, work_m, grad_ψ, work_n, vtable);
180template <Config Conf>
190 auto f = vtable.
eval_f_g(self, x, ŷ, vtable);
191 auto dᵀŷ = calc_ŷ_dᵀŷ(self, ŷ, y, Σ, vtable);
194 vtable.
eval_grad_L(self, x, ŷ, grad_ψ, work_n, vtable);
199template <Config Conf>
204template <Config Conf>
209template <Config Conf>
212template <Config Conf>
214 return "unknown problem";
@ 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...
static std::string default_get_name(const void *, const ProblemVTable &)
static real_t default_eval_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec ŷ, const ProblemVTable &vtable)
required_function_t< void(crvec x, rvec grad_fx) const > eval_grad_f
static void default_eval_hess_L_prod(const void *, crvec, crvec, real_t, crvec, rvec, const ProblemVTable &)
required_function_t< real_t(crvec x) const > eval_f
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_function_t< real_t(crvec x, rvec g) const > eval_f_g
static void default_eval_grad_gi(const void *, crvec, index_t, rvec, const ProblemVTable &)
required_function_t< void(crvec x, rvec gx) const > eval_g
static void default_eval_grad_ψ(const void *self, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m, const ProblemVTable &vtable)
optional_function_t< void(crvec x, crvec y, rvec grad_L, rvec work_n) const > eval_grad_L
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_function_t< void(crvec x, crvec y, real_t scale, crvec v, rvec Hv) const > eval_hess_L_prod
static Sparsity default_get_jac_g_sparsity(const void *, const ProblemVTable &)
optional_function_t< void(crvec x, crvec y, real_t scale, rvec H_values) const > eval_hess_L
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)
required_function_t< void(crvec x, crvec y, rvec grad_gxy) const > eval_grad_g_prod
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 &)
optional_function_t< real_t(crvec x, rvec grad_fx) const > eval_f_grad_f
static void default_eval_hess_L(const void *, crvec, crvec, real_t, rvec, const ProblemVTable &)
optional_function_t< void(crvec x, crvec y, rvec grad_f, rvec grad_gxy) const > eval_grad_f_grad_g_prod
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)
static real_t default_eval_f_grad_f(const void *self, crvec x, rvec grad_fx, const ProblemVTable &vtable)
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.