alpaqa dll
Nonconvex constrained optimization
Loading...
Searching...
No Matches
DLProblem Class Reference

#include <alpaqa/dl/dl-problem.hpp>

Detailed Description

Class that loads a problem using dlopen.

The shared library should export a C function with the name function_name that accepts a void pointer with user data, and returns a struct of type alpaqa_problem_register_t that contains all data to represent the problem, as well as function pointers for all required operations. See C++/DLProblem/main.cpp and problems/sparse-logistic-regression.cpp for examples.

Note
Copies are shallow, they all share the same problem instance, take that into account when using multiple threads.
See also
TypeErasedProblem
alpaqa_problem_functions_t
alpaqa_problem_register_t
Examples
C++/DLProblem/main.cpp.

Definition at line 105 of file dl-problem.hpp.

Inheritance diagram for DLProblem:
Collaboration diagram for DLProblem:

Public Types

using instance_t = ExtraFuncs::instance_t
using Box

Public Member Functions

 DLProblem (const std::filesystem::path &so_filename, const std::string &function_name="register_alpaqa_problem", alpaqa_register_arg_t user_param={}, DynamicLoadFlags dl_flags={})
 Load a problem from a shared library.
 DLProblem (const std::filesystem::path &so_filename, const std::string &function_name, std::any &user_param, DynamicLoadFlags dl_flags={})
 Load a problem from a shared library.
 DLProblem (const std::filesystem::path &so_filename, const std::string &function_name, std::span< std::string_view > user_param, DynamicLoadFlags dl_flags={})
 Load a problem from a shared library.
void eval_projecting_difference_constraints (crvec z, rvec e) const
void eval_projection_multipliers (rvec y, real_t M) const
real_t eval_proximal_gradient_step (real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) const
index_t eval_inactive_indices_res_lna (real_t γ, crvec x, crvec grad_ψ, rindexvec J) const
real_t eval_objective (crvec x) const
void eval_objective_gradient (crvec x, rvec grad_fx) const
void eval_constraints (crvec x, rvec gx) const
void eval_constraints_gradient_product (crvec x, crvec y, rvec grad_gxy) const
void eval_constraints_jacobian (crvec x, rvec J_values) const
Sparsity get_constraints_jacobian_sparsity () const
void eval_grad_gi (crvec x, index_t i, rvec grad_gi) const
void eval_lagrangian_hessian_product (crvec x, crvec y, real_t scale, crvec v, rvec Hv) const
void eval_lagrangian_hessian (crvec x, crvec y, real_t scale, rvec H_values) const
Sparsity get_lagrangian_hessian_sparsity () const
void eval_augmented_lagrangian_hessian_product (crvec x, crvec y, crvec Σ, real_t scale, crvec v, rvec Hv) const
void eval_augmented_lagrangian_hessian (crvec x, crvec y, crvec Σ, real_t scale, rvec H_values) const
Sparsity get_augmented_lagrangian_hessian_sparsity () const
real_t eval_objective_and_gradient (crvec x, rvec grad_fx) const
real_t eval_objective_and_constraints (crvec x, rvec g) const
void eval_objective_gradient_and_constraints_gradient_product (crvec x, crvec y, rvec grad_f, rvec grad_gxy) const
void eval_lagrangian_gradient (crvec x, crvec y, rvec grad_L, rvec work_n) const
real_t eval_augmented_lagrangian (crvec x, crvec y, crvec Σ, rvec ŷ) const
void eval_augmented_lagrangian_gradient (crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m) const
real_t eval_augmented_lagrangian_and_gradient (crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m) const
std::string get_name () const
bool provides_eval_objective () const
bool provides_eval_objective_gradient () const
bool provides_eval_constraints () const
bool provides_eval_constraints_gradient_product () const
bool provides_eval_constraints_jacobian () const
bool provides_get_constraints_jacobian_sparsity () const
bool provides_eval_grad_gi () const
bool provides_eval_lagrangian_hessian_product () const
bool provides_eval_lagrangian_hessian () const
bool provides_get_lagrangian_hessian_sparsity () const
bool provides_eval_augmented_lagrangian_hessian_product () const
bool provides_eval_augmented_lagrangian_hessian () const
bool provides_get_augmented_lagrangian_hessian_sparsity () const
bool provides_eval_objective_and_gradient () const
bool provides_eval_objective_and_constraints () const
bool provides_eval_objective_gradient_and_constraints_gradient_product () const
bool provides_eval_lagrangian_gradient () const
bool provides_eval_augmented_lagrangian () const
bool provides_eval_augmented_lagrangian_gradient () const
bool provides_eval_augmented_lagrangian_and_gradient () const
bool provides_get_variable_bounds () const
bool provides_get_general_bounds () const
bool provides_eval_inactive_indices_res_lna () const
template<class Signature, class... Args>
decltype(auto) call_extra_func (const std::string &name, Args &&...args) const
template<class Signature, class... Args>
decltype(auto) call_extra_func (const std::string &name, Args &&...args)
void resize (length_t num_variables, length_t num_constraints)
 Change the dimensions of the problem (number of decision variables and number of constraints).
length_t get_num_variables () const
 Number of decision variables \( n \), num_variables.
length_t get_num_constraints () const
 Number of constraints \( m \), num_constraints.
const Boxget_variable_bounds () const
const Boxget_general_bounds () const
void check () const

Static Public Member Functions

static real_t eval_proj_grad_step_box (const Box &C, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)
 Projected gradient step for rectangular box C.
static void eval_prox_grad_step_box_l1_impl (const Box &C, const auto &λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)
 Proximal gradient step for rectangular box C with ℓ₁-regularization.
static real_t eval_prox_grad_step_box_l1 (const Box &C, const auto &λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)
 Proximal gradient step for rectangular box C with ℓ₁-regularization.
static real_t eval_prox_grad_step_box_l1_scal (const Box &C, real_t λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)
 Proximal gradient step for rectangular box C with ℓ₁-regularization.
static void eval_proj_multipliers_box (const Box &D, rvec y, real_t M, index_t penalty_alm_split)

Public Attributes

length_t num_variables
 Number of decision variables, dimension of x.
length_t num_constraints
 Number of constraints, dimension of g(x) and z.
Box variable_bounds
 Constraints of the decision variables, \( x \in C \).
Box general_bounds
 Other constraints, \( g(x) \in D \).
vec l1_reg
 \( \ell_1 \) (1-norm) regularization parameter.
index_t penalty_alm_split
 Components of the constraint function with indices below this number are handled using a quadratic penalty method rather than using an augmented Lagrangian method.

Private Attributes

std::filesystem::path file
 Path to the shared module file.
std::shared_ptr< void > handle
 Handle to the shared module defining the problem.
std::shared_ptr< void > instance
 Problem instance created by the registration function, including the deleter to destroy it.
problem_functions_tfunctions = nullptr
 Pointer to the struct of function pointers for evaluating the objective, constraints, their gradients, etc.
ExtraFuncs extra_funcs
 Dictionary of extra functions that were registered by the problem.

Member Typedef Documentation

◆ instance_t

using instance_t = ExtraFuncs::instance_t

Definition at line 213 of file dl-problem.hpp.

◆ Box

using Box
inherited

Definition at line 19 of file box-constr-problem.hpp.

Constructor & Destructor Documentation

◆ DLProblem() [1/3]

DLProblem ( const std::filesystem::path & so_filename,
const std::string & function_name = "register_alpaqa_problem",
alpaqa_register_arg_t user_param = {},
DynamicLoadFlags dl_flags = {} )

Load a problem from a shared library.

Parameters
so_filenameFilename of the shared library to load.
function_nameName of the problem registration function. Should have signature alpaqa_problem_register_t(alpaqa_register_arg_t user_param).
user_paramPointer to custom user data to pass to the registration function.
dl_flagsFlags passed to dlopen when loading the problem.

Definition at line 136 of file dl-problem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DLProblem() [2/3]

DLProblem ( const std::filesystem::path & so_filename,
const std::string & function_name,
std::any & user_param,
DynamicLoadFlags dl_flags = {} )

Load a problem from a shared library.

Parameters
so_filenameFilename of the shared library to load.
function_nameName of the problem registration function. Should have signature alpaqa_problem_register_t(alpaqa_register_arg_t user_param).
user_paramCustom user data to pass to the registration function.
dl_flagsFlags passed to dlopen when loading the problem.

Definition at line 206 of file dl-problem.cpp.

Here is the call graph for this function:

◆ DLProblem() [3/3]

DLProblem ( const std::filesystem::path & so_filename,
const std::string & function_name,
std::span< std::string_view > user_param,
DynamicLoadFlags dl_flags = {} )

Load a problem from a shared library.

Parameters
so_filenameFilename of the shared library to load.
function_nameName of the problem registration function. Should have signature alpaqa_problem_register_t(alpaqa_register_arg_t user_param).
user_paramCustom string arguments to pass to the registration function.
dl_flagsFlags passed to dlopen when loading the problem.

Definition at line 214 of file dl-problem.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ eval_projecting_difference_constraints()

auto eval_projecting_difference_constraints ( crvec z,
rvec e ) const

Definition at line 223 of file dl-problem.cpp.

Here is the call graph for this function:

◆ eval_projection_multipliers()

auto eval_projection_multipliers ( rvec y,
real_t M ) const

Definition at line 232 of file dl-problem.cpp.

Here is the call graph for this function:

◆ eval_proximal_gradient_step()

auto eval_proximal_gradient_step ( real_t γ,
crvec x,
crvec grad_ψ,
rvec ,
rvec p ) const

Definition at line 239 of file dl-problem.cpp.

Here is the call graph for this function:

◆ eval_inactive_indices_res_lna()

auto eval_inactive_indices_res_lna ( real_t γ,
crvec x,
crvec grad_ψ,
rindexvec J ) const

Definition at line 248 of file dl-problem.cpp.

Here is the call graph for this function:

◆ eval_objective()

auto eval_objective ( crvec x) const
Examples
C++/DLProblem/main.cpp.

Definition at line 264 of file dl-problem.cpp.

◆ eval_objective_gradient()

auto eval_objective_gradient ( crvec x,
rvec grad_fx ) const

Definition at line 265 of file dl-problem.cpp.

◆ eval_constraints()

auto eval_constraints ( crvec x,
rvec gx ) const

Definition at line 266 of file dl-problem.cpp.

◆ eval_constraints_gradient_product()

auto eval_constraints_gradient_product ( crvec x,
crvec y,
rvec grad_gxy ) const

Definition at line 267 of file dl-problem.cpp.

◆ eval_constraints_jacobian()

auto eval_constraints_jacobian ( crvec x,
rvec J_values ) const

Definition at line 269 of file dl-problem.cpp.

◆ get_constraints_jacobian_sparsity()

auto get_constraints_jacobian_sparsity ( ) const

Definition at line 270 of file dl-problem.cpp.

◆ eval_grad_gi()

auto eval_grad_gi ( crvec x,
index_t i,
rvec grad_gi ) const

Definition at line 268 of file dl-problem.cpp.

◆ eval_lagrangian_hessian_product()

auto eval_lagrangian_hessian_product ( crvec x,
crvec y,
real_t scale,
crvec v,
rvec Hv ) const

Definition at line 271 of file dl-problem.cpp.

◆ eval_lagrangian_hessian()

auto eval_lagrangian_hessian ( crvec x,
crvec y,
real_t scale,
rvec H_values ) const

Definition at line 272 of file dl-problem.cpp.

◆ get_lagrangian_hessian_sparsity()

auto get_lagrangian_hessian_sparsity ( ) const

Definition at line 273 of file dl-problem.cpp.

◆ eval_augmented_lagrangian_hessian_product()

auto eval_augmented_lagrangian_hessian_product ( crvec x,
crvec y,
crvec Σ,
real_t scale,
crvec v,
rvec Hv ) const

Definition at line 274 of file dl-problem.cpp.

◆ eval_augmented_lagrangian_hessian()

auto eval_augmented_lagrangian_hessian ( crvec x,
crvec y,
crvec Σ,
real_t scale,
rvec H_values ) const

Definition at line 275 of file dl-problem.cpp.

◆ get_augmented_lagrangian_hessian_sparsity()

auto get_augmented_lagrangian_hessian_sparsity ( ) const

Definition at line 276 of file dl-problem.cpp.

◆ eval_objective_and_gradient()

auto eval_objective_and_gradient ( crvec x,
rvec grad_fx ) const

Definition at line 277 of file dl-problem.cpp.

◆ eval_objective_and_constraints()

auto eval_objective_and_constraints ( crvec x,
rvec g ) const

Definition at line 278 of file dl-problem.cpp.

◆ eval_objective_gradient_and_constraints_gradient_product()

auto eval_objective_gradient_and_constraints_gradient_product ( crvec x,
crvec y,
rvec grad_f,
rvec grad_gxy ) const

Definition at line 279 of file dl-problem.cpp.

◆ eval_lagrangian_gradient()

auto eval_lagrangian_gradient ( crvec x,
crvec y,
rvec grad_L,
rvec work_n ) const

Definition at line 280 of file dl-problem.cpp.

◆ eval_augmented_lagrangian()

auto eval_augmented_lagrangian ( crvec x,
crvec y,
crvec Σ,
rvec ŷ ) const

Definition at line 281 of file dl-problem.cpp.

◆ eval_augmented_lagrangian_gradient()

auto eval_augmented_lagrangian_gradient ( crvec x,
crvec y,
crvec Σ,
rvec grad_ψ,
rvec work_n,
rvec work_m ) const

Definition at line 282 of file dl-problem.cpp.

◆ eval_augmented_lagrangian_and_gradient()

auto eval_augmented_lagrangian_and_gradient ( crvec x,
crvec y,
crvec Σ,
rvec grad_ψ,
rvec work_n,
rvec work_m ) const

Definition at line 283 of file dl-problem.cpp.

◆ get_name()

auto get_name ( ) const

Definition at line 257 of file dl-problem.cpp.

◆ provides_eval_objective()

bool provides_eval_objective ( ) const
nodiscard

Definition at line 285 of file dl-problem.cpp.

◆ provides_eval_objective_gradient()

bool provides_eval_objective_gradient ( ) const
nodiscard

Definition at line 286 of file dl-problem.cpp.

◆ provides_eval_constraints()

bool provides_eval_constraints ( ) const
nodiscard

Definition at line 287 of file dl-problem.cpp.

◆ provides_eval_constraints_gradient_product()

bool provides_eval_constraints_gradient_product ( ) const
nodiscard

Definition at line 288 of file dl-problem.cpp.

◆ provides_eval_constraints_jacobian()

bool provides_eval_constraints_jacobian ( ) const
nodiscard

Definition at line 289 of file dl-problem.cpp.

◆ provides_get_constraints_jacobian_sparsity()

bool provides_get_constraints_jacobian_sparsity ( ) const
nodiscard

Definition at line 290 of file dl-problem.cpp.

◆ provides_eval_grad_gi()

bool provides_eval_grad_gi ( ) const
nodiscard

Definition at line 291 of file dl-problem.cpp.

◆ provides_eval_lagrangian_hessian_product()

bool provides_eval_lagrangian_hessian_product ( ) const
nodiscard

Definition at line 292 of file dl-problem.cpp.

◆ provides_eval_lagrangian_hessian()

bool provides_eval_lagrangian_hessian ( ) const
nodiscard

Definition at line 293 of file dl-problem.cpp.

◆ provides_get_lagrangian_hessian_sparsity()

bool provides_get_lagrangian_hessian_sparsity ( ) const
nodiscard

Definition at line 294 of file dl-problem.cpp.

◆ provides_eval_augmented_lagrangian_hessian_product()

bool provides_eval_augmented_lagrangian_hessian_product ( ) const
nodiscard

Definition at line 295 of file dl-problem.cpp.

◆ provides_eval_augmented_lagrangian_hessian()

bool provides_eval_augmented_lagrangian_hessian ( ) const
nodiscard

Definition at line 296 of file dl-problem.cpp.

◆ provides_get_augmented_lagrangian_hessian_sparsity()

bool provides_get_augmented_lagrangian_hessian_sparsity ( ) const
nodiscard

Definition at line 297 of file dl-problem.cpp.

◆ provides_eval_objective_and_gradient()

bool provides_eval_objective_and_gradient ( ) const
nodiscard

Definition at line 298 of file dl-problem.cpp.

◆ provides_eval_objective_and_constraints()

bool provides_eval_objective_and_constraints ( ) const
nodiscard

Definition at line 299 of file dl-problem.cpp.

◆ provides_eval_objective_gradient_and_constraints_gradient_product()

bool provides_eval_objective_gradient_and_constraints_gradient_product ( ) const
nodiscard

Definition at line 300 of file dl-problem.cpp.

◆ provides_eval_lagrangian_gradient()

bool provides_eval_lagrangian_gradient ( ) const
nodiscard

Definition at line 301 of file dl-problem.cpp.

◆ provides_eval_augmented_lagrangian()

bool provides_eval_augmented_lagrangian ( ) const
nodiscard

Definition at line 302 of file dl-problem.cpp.

◆ provides_eval_augmented_lagrangian_gradient()

bool provides_eval_augmented_lagrangian_gradient ( ) const
nodiscard

Definition at line 303 of file dl-problem.cpp.

◆ provides_eval_augmented_lagrangian_and_gradient()

bool provides_eval_augmented_lagrangian_and_gradient ( ) const
nodiscard

Definition at line 304 of file dl-problem.cpp.

◆ provides_get_variable_bounds()

bool provides_get_variable_bounds ( ) const
nodiscard

Definition at line 305 of file dl-problem.cpp.

Here is the call graph for this function:

◆ provides_get_general_bounds()

bool provides_get_general_bounds ( ) const
nodiscard

Definition at line 306 of file dl-problem.cpp.

◆ provides_eval_inactive_indices_res_lna()

bool provides_eval_inactive_indices_res_lna ( ) const
nodiscard

Definition at line 307 of file dl-problem.cpp.

◆ call_extra_func() [1/2]

template<class Signature, class... Args>
decltype(auto) call_extra_func ( const std::string & name,
Args &&... args ) const
inline

Definition at line 216 of file dl-problem.hpp.

◆ call_extra_func() [2/2]

template<class Signature, class... Args>
decltype(auto) call_extra_func ( const std::string & name,
Args &&... args )
inline

Definition at line 224 of file dl-problem.hpp.

◆ resize()

void resize ( length_t num_variables,
length_t num_constraints )
inlineinherited

Change the dimensions of the problem (number of decision variables and number of constraints).

Destructive: resizes and/or resets the members variable_bounds, general_bounds, l1_reg and penalty_alm_split.

Parameters
num_variablesNumber of decision variables
num_constraintsNumber of constraints

Definition at line 47 of file box-constr-problem.hpp.

◆ get_num_variables()

length_t get_num_variables ( ) const
inlineinherited

Number of decision variables \( n \), num_variables.

Examples
C++/DLProblem/main.cpp.

Definition at line 83 of file box-constr-problem.hpp.

◆ get_num_constraints()

length_t get_num_constraints ( ) const
inlineinherited

Number of constraints \( m \), num_constraints.

Examples
C++/DLProblem/main.cpp.

Definition at line 85 of file box-constr-problem.hpp.

◆ eval_proj_grad_step_box()

real_t eval_proj_grad_step_box ( const Box & C,
real_t γ,
crvec x,
crvec grad_ψ,
rvec ,
rvec p )
inlinestaticinherited

Projected gradient step for rectangular box C.

\[ \begin{aligned} \hat x &= \Pi_C(x - \gamma\nabla\psi(x)) \\ p &= \hat x - x \\ &= \max(\underline x - x, \;\min(-\gamma\nabla\psi(x), \overline x - x) \end{aligned} \]

Definition at line 92 of file box-constr-problem.hpp.

◆ eval_prox_grad_step_box_l1_impl()

void eval_prox_grad_step_box_l1_impl ( const Box & C,
const auto & λ,
real_t γ,
crvec x,
crvec grad_ψ,
rvec ,
rvec p )
inlinestaticinherited

Proximal gradient step for rectangular box C with ℓ₁-regularization.

\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]

Definition at line 115 of file box-constr-problem.hpp.

◆ eval_prox_grad_step_box_l1()

real_t eval_prox_grad_step_box_l1 ( const Box & C,
const auto & λ,
real_t γ,
crvec x,
crvec grad_ψ,
rvec ,
rvec p )
inlinestaticinherited

Proximal gradient step for rectangular box C with ℓ₁-regularization.

\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]

Definition at line 124 of file box-constr-problem.hpp.

◆ eval_prox_grad_step_box_l1_scal()

real_t eval_prox_grad_step_box_l1_scal ( const Box & C,
real_t λ,
real_t γ,
crvec x,
crvec grad_ψ,
rvec ,
rvec p )
inlinestaticinherited

Proximal gradient step for rectangular box C with ℓ₁-regularization.

\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]

Definition at line 132 of file box-constr-problem.hpp.

◆ eval_proj_multipliers_box()

void eval_proj_multipliers_box ( const Box & D,
rvec y,
real_t M,
index_t penalty_alm_split )
inlinestaticinherited

Definition at line 157 of file box-constr-problem.hpp.

◆ get_variable_bounds()

const Box & get_variable_bounds ( ) const
inlineinherited
See also
get_variable_bounds

Definition at line 178 of file box-constr-problem.hpp.

◆ get_general_bounds()

const Box & get_general_bounds ( ) const
inlineinherited
See also
get_general_bounds

Definition at line 180 of file box-constr-problem.hpp.

◆ check()

void check ( ) const
inlineinherited
See also
check

Definition at line 233 of file box-constr-problem.hpp.

Member Data Documentation

◆ file

std::filesystem::path file
private

Path to the shared module file.

Definition at line 148 of file dl-problem.hpp.

◆ handle

std::shared_ptr<void> handle
private

Handle to the shared module defining the problem.

Definition at line 150 of file dl-problem.hpp.

◆ instance

std::shared_ptr<void> instance
private

Problem instance created by the registration function, including the deleter to destroy it.

Definition at line 153 of file dl-problem.hpp.

◆ functions

problem_functions_t* functions = nullptr
private

Pointer to the struct of function pointers for evaluating the objective, constraints, their gradients, etc.

Definition at line 156 of file dl-problem.hpp.

◆ extra_funcs

ExtraFuncs extra_funcs
private

Dictionary of extra functions that were registered by the problem.

Definition at line 158 of file dl-problem.hpp.

◆ num_variables

length_t num_variables
inherited

Number of decision variables, dimension of x.

Definition at line 22 of file box-constr-problem.hpp.

◆ num_constraints

length_t num_constraints
inherited

Number of constraints, dimension of g(x) and z.

Definition at line 24 of file box-constr-problem.hpp.

◆ variable_bounds

Box variable_bounds
inherited

Constraints of the decision variables, \( x \in C \).

Examples
C++/DLProblem/main.cpp.

Definition at line 67 of file box-constr-problem.hpp.

◆ general_bounds

Box general_bounds
inherited

Other constraints, \( g(x) \in D \).

Examples
C++/DLProblem/main.cpp.

Definition at line 69 of file box-constr-problem.hpp.

◆ l1_reg

vec l1_reg
inherited

\( \ell_1 \) (1-norm) regularization parameter.

Possible dimensions are: \( 0 \) (no regularization), \( 1 \) (a single scalar factor), or \( n \) (a different factor for each variable).

Definition at line 74 of file box-constr-problem.hpp.

◆ penalty_alm_split

index_t penalty_alm_split
inherited

Components of the constraint function with indices below this number are handled using a quadratic penalty method rather than using an augmented Lagrangian method.

Specifically, the Lagrange multipliers for these components (which determine the shifts in ALM) are kept at zero.

Definition at line 80 of file box-constr-problem.hpp.


The documentation for this class was generated from the following files: