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

Expression referencing the result of a function call. More...

#include <wrapper.h>

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

Public Types

using PlainObject = typename DERIVED::PlainObject
 
using Index = typename DERIVED::Index
 

Public Member Functions

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

Detailed Description

template<typename FUNCTION, typename DERIVED>
class sopt::details::AppliedFunction< FUNCTION, DERIVED >

Expression referencing the result of a function call.

Definition at line 16 of file wrapper.h.

Member Typedef Documentation

◆ Index

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

Definition at line 19 of file wrapper.h.

◆ PlainObject

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

Definition at line 18 of file wrapper.h.

Constructor & Destructor Documentation

◆ AppliedFunction() [1/4]

template<typename FUNCTION , typename DERIVED >
sopt::details::AppliedFunction< FUNCTION, DERIVED >::AppliedFunction ( FUNCTION const &  func,
DERIVED const &  x,
Index  rows 
)
inline

Definition at line 21 of file wrapper.h.

22  : func(func), x(x), rows_(rows) {}

◆ AppliedFunction() [2/4]

template<typename FUNCTION , typename DERIVED >
sopt::details::AppliedFunction< FUNCTION, DERIVED >::AppliedFunction ( FUNCTION const &  func,
DERIVED const &  x 
)
inline

Definition at line 23 of file wrapper.h.

23 : func(func), x(x), rows_(x.rows()) {}

◆ AppliedFunction() [3/4]

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

Definition at line 24 of file wrapper.h.

24 : func(c.func), x(c.x), rows_(c.rows_) {}

◆ AppliedFunction() [4/4]

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

Definition at line 25 of file wrapper.h.

25 : func(std::move(c.func)), x(c.x), rows_(c.rows_) {}

Member Function Documentation

◆ cols()

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

Definition at line 33 of file wrapper.h.

33 { return x.cols(); }

◆ evalTo()

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

Definition at line 28 of file wrapper.h.

28  {
29  func(destination, x);
30  }

◆ rows()

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

Definition at line 32 of file wrapper.h.

32 { return rows_; }

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