SOPT
Sparse OPTimisation
Public Types | Public Member Functions | List of all members
sopt::algorithm::L1GProximal< SCALAR > Class Template Reference

#include <l1_non_diff_function.h>

+ Inheritance diagram for sopt::algorithm::L1GProximal< SCALAR >:
+ Collaboration diagram for sopt::algorithm::L1GProximal< SCALAR >:

Public Types

using FB = ForwardBackward< SCALAR >
 
using Real = typename FB::Real
 
using Scalar = typename FB::Scalar
 
using t_Vector = typename FB::t_Vector
 
using t_Proximal = typename FB::t_Proximal
 
using t_LinearTransform = typename FB::t_LinearTransform
 
- Public Types inherited from NonDifferentiableFunc< SCALAR >
using FB = sopt::algorithm::ForwardBackward< SCALAR >
 
using Real = typename FB::Real
 
using t_Vector = typename FB::t_Vector
 
using t_Proximal = typename FB::t_Proximal
 
using t_LinearTransform = typename FB::t_LinearTransform
 

Public Member Functions

 L1GProximal (bool tight_frame=false)
 
 ~L1GProximal ()
 
void log_message () const override
 
Real function (t_Vector const &x) const override
 
t_Proximal proximal_operator () const override
 
t_LinearTransform const & Psi () const override
 Analysis operator Ψ More...
 
proximal::L1< Scalar > & l1_proximal ()
 L1 proximal used during calculation. More...
 
proximal::L1< Scalar > const & l1_proximal () const
 
L1GProximal< SCALAR > & l1_proximal (proximal::L1< Scalar > const &arg)
 
 SOPT_MACRO (itermax, t_uint)
 
 SOPT_MACRO (tolerance, Real)
 
 SOPT_MACRO (positivity_constraint, bool)
 
 SOPT_MACRO (real_constraint, bool)
 
 SOPT_MACRO (nu, Real)
 
 SOPT_MACRO (weights, Vector< t_real >)
 
L1GProximal< SCALAR > &::type Psi (ARGS &&... args)
 

Detailed Description

template<typename SCALAR>
class sopt::algorithm::L1GProximal< SCALAR >

Definition at line 27 of file l1_non_diff_function.h.

Member Typedef Documentation

◆ FB

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::FB = ForwardBackward<SCALAR>

Definition at line 30 of file l1_non_diff_function.h.

◆ Real

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::Real = typename FB::Real

Definition at line 31 of file l1_non_diff_function.h.

◆ Scalar

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::Scalar = typename FB::Scalar

Definition at line 32 of file l1_non_diff_function.h.

◆ t_LinearTransform

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::t_LinearTransform = typename FB::t_LinearTransform

Definition at line 35 of file l1_non_diff_function.h.

◆ t_Proximal

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::t_Proximal = typename FB::t_Proximal

Definition at line 34 of file l1_non_diff_function.h.

◆ t_Vector

template<typename SCALAR >
using sopt::algorithm::L1GProximal< SCALAR >::t_Vector = typename FB::t_Vector

Definition at line 33 of file l1_non_diff_function.h.

Constructor & Destructor Documentation

◆ L1GProximal()

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::L1GProximal ( bool  tight_frame = false)
inline

Definition at line 40 of file l1_non_diff_function.h.

41  : tight_frame_ (tight_frame),
42  l1_proximal_() {}

◆ ~L1GProximal()

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::~L1GProximal ( )
inline

Definition at line 43 of file l1_non_diff_function.h.

43 {}

Member Function Documentation

◆ function()

template<typename SCALAR >
Real sopt::algorithm::L1GProximal< SCALAR >::function ( t_Vector const &  x) const
inlineoverridevirtual

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 53 of file l1_non_diff_function.h.

53  {
54  auto &weights = l1_proximal_weights();
55  auto input = static_cast<t_Vector>(Psi().adjoint() * x);
56  return sopt::l1_norm(input, weights);
57  }
sopt::Vector< Scalar > t_Vector
t_LinearTransform const & Psi() const override
Analysis operator Ψ
real_type< typename T0::Scalar >::type l1_norm(Eigen::ArrayBase< T0 > const &input, Eigen::ArrayBase< T1 > const &weights)
Computes weighted L1 norm.
Definition: maths.h:116

References sopt::l1_norm(), and sopt::algorithm::L1GProximal< SCALAR >::Psi().

◆ l1_proximal() [1/3]

template<typename SCALAR >
proximal::L1<Scalar>& sopt::algorithm::L1GProximal< SCALAR >::l1_proximal ( )
inline

L1 proximal used during calculation.

Non-const version to setup the object.

Definition at line 78 of file l1_non_diff_function.h.

78 { return l1_proximal_; }

Referenced by sopt::algorithm::L1GProximal< SCALAR >::proximal_operator(), and sopt::algorithm::L1GProximal< SCALAR >::Psi().

◆ l1_proximal() [2/3]

template<typename SCALAR >
proximal::L1<Scalar> const& sopt::algorithm::L1GProximal< SCALAR >::l1_proximal ( ) const
inline

Definition at line 79 of file l1_non_diff_function.h.

79 { return l1_proximal_; }

◆ l1_proximal() [3/3]

template<typename SCALAR >
L1GProximal<SCALAR>& sopt::algorithm::L1GProximal< SCALAR >::l1_proximal ( proximal::L1< Scalar > const &  arg)
inline

Definition at line 80 of file l1_non_diff_function.h.

80  {
81  l1_proximal_ = arg;
82  return *this;
83  }

◆ log_message()

template<typename SCALAR >
void sopt::algorithm::L1GProximal< SCALAR >::log_message ( ) const
inlineoverridevirtual

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 48 of file l1_non_diff_function.h.

48  {
49  SOPT_HIGH_LOG("Performing Forward Backward with L1 and L2 norms");
50  }
#define SOPT_HIGH_LOG(...)
High priority message.
Definition: logging.h:223

References SOPT_HIGH_LOG.

◆ proximal_operator()

template<typename SCALAR >
t_Proximal sopt::algorithm::L1GProximal< SCALAR >::proximal_operator ( ) const
inlineoverridevirtual

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 60 of file l1_non_diff_function.h.

60  {
61  return [this](t_Vector &out, Real gamma, t_Vector const &x) {
62  this -> l1_proximal(out, gamma, x);
63  };
64  }
proximal::L1< Scalar > & l1_proximal()
L1 proximal used during calculation.

References sopt::algorithm::L1GProximal< SCALAR >::l1_proximal().

◆ Psi() [1/2]

template<typename SCALAR >
t_LinearTransform const& sopt::algorithm::L1GProximal< SCALAR >::Psi ( ) const
inlineoverridevirtual

Analysis operator Ψ

Under-the-hood, the object is actually owned by the l1 proximal.

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 68 of file l1_non_diff_function.h.

68  {
69  return l1_proximal().Psi();
70  }
LinearTransform< Vector< Scalar > > const & Psi() const
Linear transform applied to input prior to L1 norm.
Definition: l1_proximal.h:302

References sopt::algorithm::L1GProximal< SCALAR >::l1_proximal(), and sopt::proximal::L1< SCALAR >::Psi().

Referenced by sopt::algorithm::L1GProximal< SCALAR >::function().

◆ Psi() [2/2]

template<typename SCALAR >
L1GProximal<SCALAR>& ::type sopt::algorithm::L1GProximal< SCALAR >::Psi ( ARGS &&...  args)
inline

Definition at line 113 of file l1_non_diff_function.h.

114  {
115  l1_proximal().Psi(std::forward<ARGS>(args)...);
116  return *this;
117  }

References sopt::algorithm::L1GProximal< SCALAR >::l1_proximal(), and sopt::proximal::L1< SCALAR >::Psi().

◆ SOPT_MACRO() [1/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( itermax  ,
t_uint   
)

◆ SOPT_MACRO() [2/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( nu  ,
Real   
)

◆ SOPT_MACRO() [3/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( positivity_constraint  ,
bool   
)

◆ SOPT_MACRO() [4/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( real_constraint  ,
bool   
)

◆ SOPT_MACRO() [5/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( tolerance  ,
Real   
)

◆ SOPT_MACRO() [6/6]

template<typename SCALAR >
sopt::algorithm::L1GProximal< SCALAR >::SOPT_MACRO ( weights  ,
Vector< t_real  
)

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