SOPT
Sparse OPTimisation
Public Types | Public Member Functions | List of all members
sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED > Class Template Reference

Expression referencing a lazy proximal function call. More...

#include <proximal_expression.h>

+ Inheritance diagram for sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >:
+ Collaboration diagram for sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >:

Public Types

using PlainObject = typename DERIVED::PlainObject
 
using Index = typename DERIVED::Index
 
using Real = typename real_type< typename DERIVED::Scalar >::type
 

Public Member Functions

 DelayedProximalFunction (FUNCTION const &func, Real const &gamma, DERIVED const &x)
 
 DelayedProximalFunction (DelayedProximalFunction const &c)
 
 DelayedProximalFunction (DelayedProximalFunction &&c)
 
template<typename DESTINATION >
void evalTo (DESTINATION &destination) const
 
Index rows () const
 
Index cols () const
 

Detailed Description

template<typename FUNCTION, typename DERIVED>
class sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >

Expression referencing a lazy proximal function call.

It helps transform the call proximal(out, gamma, input) to out = proximal(gamma, input) without incurring copy or allocation overhead if out already exists.

Definition at line 19 of file proximal_expression.h.

Member Typedef Documentation

◆ Index

template<typename FUNCTION , typename DERIVED >
using sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::Index = typename DERIVED::Index

Definition at line 23 of file proximal_expression.h.

◆ PlainObject

template<typename FUNCTION , typename DERIVED >
using sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::PlainObject = typename DERIVED::PlainObject

Definition at line 22 of file proximal_expression.h.

◆ Real

template<typename FUNCTION , typename DERIVED >
using sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::Real = typename real_type<typename DERIVED::Scalar>::type

Definition at line 24 of file proximal_expression.h.

Constructor & Destructor Documentation

◆ DelayedProximalFunction() [1/3]

template<typename FUNCTION , typename DERIVED >
sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::DelayedProximalFunction ( FUNCTION const &  func,
Real const &  gamma,
DERIVED const &  x 
)
inline

Definition at line 26 of file proximal_expression.h.

27  : func(func), gamma(gamma), x(x) {}

◆ DelayedProximalFunction() [2/3]

template<typename FUNCTION , typename DERIVED >
sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::DelayedProximalFunction ( DelayedProximalFunction< FUNCTION, DERIVED > const &  c)
inline

Definition at line 28 of file proximal_expression.h.

29  : func(c.func), gamma(c.gamma), x(c.x) {}

◆ DelayedProximalFunction() [3/3]

template<typename FUNCTION , typename DERIVED >
sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::DelayedProximalFunction ( DelayedProximalFunction< FUNCTION, DERIVED > &&  c)
inline

Definition at line 30 of file proximal_expression.h.

31  : func(std::move(c.func)), gamma(c.gamma), x(c.x) {}

Member Function Documentation

◆ cols()

template<typename FUNCTION , typename DERIVED >
Index sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::cols ( ) const
inline

Definition at line 40 of file proximal_expression.h.

40 { return x.cols(); }

◆ evalTo()

template<typename FUNCTION , typename DERIVED >
template<typename DESTINATION >
void sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::evalTo ( DESTINATION &  destination) const
inline

Definition at line 34 of file proximal_expression.h.

34  {
35  destination.resizeLike(x);
36  func(destination, gamma, x);
37  }

◆ rows()

template<typename FUNCTION , typename DERIVED >
Index sopt::proximal::details::DelayedProximalFunction< FUNCTION, DERIVED >::rows ( ) const
inline

Definition at line 39 of file proximal_expression.h.

39 { return x.rows(); }

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