alpaqa 1.0.0a16
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
L1Norm< Conf, Weight > Struct Template Reference

#include <alpaqa/functions/l1-norm.hpp>

Detailed Description

template<Config Conf, class Weight = typename Conf::real_t>
requires (std::is_same_v<Weight, typename Conf::real_t> || std::is_same_v<Weight, typename Conf::vec> || std::is_same_v<Weight, typename Conf::rvec> || std::is_same_v<Weight, typename Conf::crvec>)
struct alpaqa::functions::L1Norm< Conf, Weight >

ℓ₁-norm.

Template Parameters
WeightType of weighting factors. Either scalar or vector.
Examples
C++/Advanced/lasso-fbs.cpp.

Definition at line 21 of file l1-norm.hpp.

+ Collaboration diagram for L1Norm< Conf, Weight >:

Public Types

using weight_t = Weight
 

Public Member Functions

 L1Norm (weight_t λ)
 
 L1Norm ()
 
 L1Norm ()=default
 
real_t prox (crmat in, rmat out, real_t γ=1)
 

Public Attributes

weight_t λ
 

Static Public Attributes

static constexpr bool scalar_weight = std::is_same_v<weight_t, real_t>
 

Member Typedef Documentation

◆ weight_t

template<Config Conf, class Weight = typename Conf::real_t>
using weight_t = Weight

Definition at line 23 of file l1-norm.hpp.

Constructor & Destructor Documentation

◆ L1Norm() [1/3]

template<Config Conf, class Weight = typename Conf::real_t>
L1Norm ( weight_t  λ)
inline

Definition at line 26 of file l1-norm.hpp.

◆ L1Norm() [2/3]

template<Config Conf, class Weight = typename Conf::real_t>
L1Norm ( )
inline

Definition at line 37 of file l1-norm.hpp.

◆ L1Norm() [3/3]

template<Config Conf, class Weight = typename Conf::real_t>
L1Norm ( )
default

Member Function Documentation

◆ prox()

template<Config Conf, class Weight = typename Conf::real_t>
real_t prox ( crmat  in,
rmat  out,
real_t  γ = 1 
)
inline

Definition at line 46 of file l1-norm.hpp.

Member Data Documentation

◆ scalar_weight

template<Config Conf, class Weight = typename Conf::real_t>
constexpr bool scalar_weight = std::is_same_v<weight_t, real_t>
staticconstexpr

Definition at line 24 of file l1-norm.hpp.

◆ λ

template<Config Conf, class Weight = typename Conf::real_t>
weight_t λ

Definition at line 44 of file l1-norm.hpp.


The documentation for this struct was generated from the following file: