SOPT
Sparse OPTimisation
Public Member Functions | List of all members
sopt::proximal::Translation< FUNCTION, VECTOR > Class Template Reference

Translation over proximal function. More...

#include <proximal.h>

Public Member Functions

template<typename T_VECTOR >
 Translation (FUNCTION const &func, T_VECTOR const &trans)
 Creates proximal of translated function. More...
 
template<typename OUTPUT , typename T0 >
std::enable_if< std::is_reference< OUTPUT >::value, void >::type operator() (OUTPUT out, typename real_type< typename T0::Scalar >::type const &t, Eigen::MatrixBase< T0 > const &x) const
 Computes proximal of translated function. More...
 
template<typename T0 >
void operator() (Vector< typename T0::Scalar > &out, typename real_type< typename T0::Scalar >::type const &t, Eigen::MatrixBase< T0 > const &x) const
 Computes proximal of translated function. More...
 
template<typename T0 >
ProximalExpression< Translation< FUNCTION, VECTOR > const &, T0 > operator() (typename T0::Scalar const &t, Eigen::MatrixBase< T0 > const &x) const
 Lazy version. More...
 

Detailed Description

template<typename FUNCTION, typename VECTOR>
class sopt::proximal::Translation< FUNCTION, VECTOR >

Translation over proximal function.

Definition at line 325 of file proximal.h.

Constructor & Destructor Documentation

◆ Translation()

template<typename FUNCTION , typename VECTOR >
template<typename T_VECTOR >
sopt::proximal::Translation< FUNCTION, VECTOR >::Translation ( FUNCTION const &  func,
T_VECTOR const &  trans 
)
inline

Creates proximal of translated function.

Definition at line 329 of file proximal.h.

329 : func(func), trans(trans) {}

Member Function Documentation

◆ operator()() [1/3]

template<typename FUNCTION , typename VECTOR >
template<typename OUTPUT , typename T0 >
std::enable_if<std::is_reference<OUTPUT>::value, void>::type sopt::proximal::Translation< FUNCTION, VECTOR >::operator() ( OUTPUT  out,
typename real_type< typename T0::Scalar >::type const &  t,
Eigen::MatrixBase< T0 > const &  x 
) const
inline

Computes proximal of translated function.

Definition at line 332 of file proximal.h.

334  {
335  func(out, t, x + trans);
336  out -= trans;
337  }

◆ operator()() [2/3]

template<typename FUNCTION , typename VECTOR >
template<typename T0 >
ProximalExpression<Translation<FUNCTION, VECTOR> const &, T0> sopt::proximal::Translation< FUNCTION, VECTOR >::operator() ( typename T0::Scalar const &  t,
Eigen::MatrixBase< T0 > const &  x 
) const
inline

Lazy version.

Definition at line 348 of file proximal.h.

349  {
350  return {*this, t, x};
351  }

◆ operator()() [3/3]

template<typename FUNCTION , typename VECTOR >
template<typename T0 >
void sopt::proximal::Translation< FUNCTION, VECTOR >::operator() ( Vector< typename T0::Scalar > &  out,
typename real_type< typename T0::Scalar >::type const &  t,
Eigen::MatrixBase< T0 > const &  x 
) const
inline

Computes proximal of translated function.

Definition at line 340 of file proximal.h.

342  {
343  func(out, t, x + trans);
344  out -= trans;
345  }

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