#include <alpaqa/dl/dl-problem.h>
C API providing function pointers to problem functions.
Used by alpaqa::dl::DLProblem.
Definition at line 162 of file dl-problem.h.
Collaboration diagram for alpaqa_problem_functions_t:Public Attributes | |
| alpaqa_length_t | n { 0 } |
| Number of decision variables. | |
| alpaqa_length_t | m { 0 } |
| Number of constraints. | |
| alpaqa_real_t(* | eval_f )(void *instance, const alpaqa_real_t *x) |
| Cost function. | |
| void(* | eval_grad_f )(void *instance, const alpaqa_real_t *x, alpaqa_real_t *grad_fx) |
| Gradient of the cost function. | |
| void(* | eval_g )(void *instance, const alpaqa_real_t *x, alpaqa_real_t *gx) |
| Constraints function. | |
| void(* | eval_grad_g_prod )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, alpaqa_real_t *grad_gxy) |
| Gradient-vector product of the constraints function. | |
| void(* | eval_jac_g )(void *instance, const alpaqa_real_t *x, alpaqa_real_t *J_values) |
| Jacobian of the constraints function. | |
| alpaqa_sparsity_t(* | get_jac_g_sparsity )(void *instance) |
| Get the sparsity pattern of the Jacobian of the constraints function. | |
| void(* | eval_grad_gi )(void *instance, const alpaqa_real_t *x, alpaqa_index_t i, alpaqa_real_t *grad_gi) |
| Gradient of specific constraint function. | |
| void(* | eval_hess_L_prod )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, alpaqa_real_t scale, const alpaqa_real_t *v, alpaqa_real_t *Hv) |
| Hessian-vector product of the Lagrangian. | |
| void(* | eval_hess_L )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, alpaqa_real_t scale, alpaqa_real_t *H_values) |
| Hessian of the Lagrangian. | |
| alpaqa_sparsity_t(* | get_hess_L_sparsity )(void *instance) |
| Get the sparsity pattern of the Hessian of the Lagrangian. | |
| void(* | eval_hess_ψ_prod )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, const alpaqa_real_t *Σ, alpaqa_real_t scale, const alpaqa_real_t *zl, const alpaqa_real_t *zu, const alpaqa_real_t *v, alpaqa_real_t *Hv) |
| Hessian-vector product of the augmented Lagrangian. | |
| void(* | eval_hess_ψ )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, const alpaqa_real_t *Σ, alpaqa_real_t scale, const alpaqa_real_t *zl, const alpaqa_real_t *zu, alpaqa_real_t *H_values) |
| Hessian of the augmented Lagrangian. | |
| alpaqa_sparsity_t(* | get_hess_ψ_sparsity )(void *instance) |
| Get the sparsity pattern of the Hessian of the augmented Lagrangian. | |
| alpaqa_real_t(* | eval_f_grad_f )(void *instance, const alpaqa_real_t *x, alpaqa_real_t *grad_fx) |
| Cost and its gradient. | |
| alpaqa_real_t(* | eval_f_g )(void *instance, const alpaqa_real_t *x, alpaqa_real_t *g) |
| Cost and constraints. | |
| void(* | eval_grad_f_grad_g_prod )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, alpaqa_real_t *grad_f, alpaqa_real_t *grad_gxy) |
| Gradient of the cost and gradient-vector product of the constraints. | |
| void(* | eval_grad_L )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, alpaqa_real_t *grad_L, alpaqa_real_t *work_n) |
| Gradient of the Lagrangian. | |
| alpaqa_real_t(* | eval_ψ )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, const alpaqa_real_t *Σ, const alpaqa_real_t *zl, const alpaqa_real_t *zu, alpaqa_real_t *ŷ) |
| Augmented Lagrangian. | |
| void(* | eval_grad_ψ )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, const alpaqa_real_t *Σ, const alpaqa_real_t *zl, const alpaqa_real_t *zu, alpaqa_real_t *grad_ψ, alpaqa_real_t *work_n, alpaqa_real_t *work_m) |
| Gradient of the augmented Lagrangian. | |
| alpaqa_real_t(* | eval_ψ_grad_ψ )(void *instance, const alpaqa_real_t *x, const alpaqa_real_t *y, const alpaqa_real_t *Σ, const alpaqa_real_t *zl, const alpaqa_real_t *zu, alpaqa_real_t *grad_ψ, alpaqa_real_t *work_n, alpaqa_real_t *work_m) |
| Augmented Lagrangian and its gradient. | |
| alpaqa_real_t(* | eval_prox_grad_step )(void *instance, alpaqa_real_t γ, const alpaqa_real_t *x, const alpaqa_real_t *grad_ψ, alpaqa_real_t *x̂, alpaqa_real_t *p) |
| Proximal gradient step. | |
| void(* | initialize_box_C )(void *instance, alpaqa_real_t *lb, alpaqa_real_t *ub) |
| Provide the initial values for the bounds of alpaqa::BoxConstrProblem::C, i.e. | |
| void(* | initialize_box_D )(void *instance, alpaqa_real_t *lb, alpaqa_real_t *ub) |
| Provide the initial values for the bounds of alpaqa::BoxConstrProblem::D, i.e. | |
| void(* | initialize_l1_reg )(void *instance, alpaqa_real_t *lambda, alpaqa_length_t *size) |
| Provide the initial values for alpaqa::BoxConstrProblem::l1_reg, the ℓ₁-regularization factor. | |
| alpaqa_length_t n { 0 } |
Number of decision variables.
Definition at line 165 of file dl-problem.h.
| alpaqa_length_t m { 0 } |
Number of constraints.
Definition at line 168 of file dl-problem.h.
|
inline |
Cost function.
Definition at line 173 of file dl-problem.h.
|
inline |
Gradient of the cost function.
Definition at line 178 of file dl-problem.h.
|
inline |
Constraints function.
Definition at line 184 of file dl-problem.h.
|
inline |
Gradient-vector product of the constraints function.
Definition at line 190 of file dl-problem.h.
|
inline |
Jacobian of the constraints function.
Definition at line 197 of file dl-problem.h.
|
inline |
Get the sparsity pattern of the Jacobian of the constraints function.
Definition at line 203 of file dl-problem.h.
|
inline |
Gradient of specific constraint function.
Definition at line 207 of file dl-problem.h.
|
inline |
Hessian-vector product of the Lagrangian.
Definition at line 214 of file dl-problem.h.
|
inline |
Hessian of the Lagrangian.
Definition at line 223 of file dl-problem.h.
|
inline |
Get the sparsity pattern of the Hessian of the Lagrangian.
Definition at line 231 of file dl-problem.h.
|
inline |
Hessian-vector product of the augmented Lagrangian.
Definition at line 235 of file dl-problem.h.
|
inline |
Hessian of the augmented Lagrangian.
Definition at line 247 of file dl-problem.h.
|
inline |
Get the sparsity pattern of the Hessian of the augmented Lagrangian.
Definition at line 258 of file dl-problem.h.
|
inline |
Cost and its gradient.
Definition at line 262 of file dl-problem.h.
|
inline |
Cost and constraints.
Definition at line 268 of file dl-problem.h.
|
inline |
Gradient of the cost and gradient-vector product of the constraints.
Definition at line 274 of file dl-problem.h.
|
inline |
Gradient of the Lagrangian.
Definition at line 282 of file dl-problem.h.
|
inline |
Augmented Lagrangian.
Definition at line 290 of file dl-problem.h.
|
inline |
Gradient of the augmented Lagrangian.
Definition at line 300 of file dl-problem.h.
|
inline |
Augmented Lagrangian and its gradient.
Definition at line 312 of file dl-problem.h.
|
inline |
Proximal gradient step.
Definition at line 326 of file dl-problem.h.
|
inline |
Provide the initial values for the bounds of alpaqa::BoxConstrProblem::C, i.e.
the constraints on the decision variables.
Definition at line 336 of file dl-problem.h.
|
inline |
Provide the initial values for the bounds of alpaqa::BoxConstrProblem::D, i.e.
the general constraints.
Definition at line 342 of file dl-problem.h.
|
inline |
Provide the initial values for alpaqa::BoxConstrProblem::l1_reg, the ℓ₁-regularization factor.
This function is called twice:
lambda set to nullptr, and the user should set the size.lambda pointing to an array of that size, and the user should initialize this array. Definition at line 352 of file dl-problem.h.