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

#include <tf_non_diff_function.h>

+ Inheritance diagram for sopt::algorithm::TFGProximal< SCALAR >:
+ Collaboration diagram for sopt::algorithm::TFGProximal< 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

 TFGProximal (const std::string &path)
 
 ~TFGProximal ()
 
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...
 

Detailed Description

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

Definition at line 26 of file tf_non_diff_function.h.

Member Typedef Documentation

◆ FB

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

Definition at line 29 of file tf_non_diff_function.h.

◆ Real

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

Definition at line 30 of file tf_non_diff_function.h.

◆ Scalar

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

Definition at line 31 of file tf_non_diff_function.h.

◆ t_LinearTransform

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

Definition at line 34 of file tf_non_diff_function.h.

◆ t_Proximal

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

Definition at line 33 of file tf_non_diff_function.h.

◆ t_Vector

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

Definition at line 32 of file tf_non_diff_function.h.

Constructor & Destructor Documentation

◆ TFGProximal()

template<typename SCALAR >
sopt::algorithm::TFGProximal< SCALAR >::TFGProximal ( const std::string &  path)
inline

Definition at line 38 of file tf_non_diff_function.h.

39  : model_(path),
40  Psi_(linear_transform_identity<Scalar>()) {}

◆ ~TFGProximal()

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

Definition at line 41 of file tf_non_diff_function.h.

41 {};

Member Function Documentation

◆ function()

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

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 49 of file tf_non_diff_function.h.

49  {
50  auto weights = Vector<Real>::Ones(x.size());
51  return sopt::l1_norm(static_cast<t_Vector>(x), weights);
52  }
sopt::Vector< Scalar > t_Vector
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
sopt::Vector< Scalar > Vector
Definition: inpainting.cc:28

References sopt::l1_norm().

◆ log_message()

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

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 44 of file tf_non_diff_function.h.

44  {
45  SOPT_HIGH_LOG("Performing Forward Backward TensorFlow model");
46  }
#define SOPT_HIGH_LOG(...)
High priority message.
Definition: logging.h:223

References SOPT_HIGH_LOG.

◆ proximal_operator()

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

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 55 of file tf_non_diff_function.h.

55  {
56  return [this](t_Vector &out, Real gamma, t_Vector const &x) {
57  this -> call_model(out, x);
58  };
59  }

◆ Psi()

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

Analysis operator Ψ

Implements NonDifferentiableFunc< SCALAR >.

Definition at line 63 of file tf_non_diff_function.h.

63  {
64  return Psi_;
65  }

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