SOPT
Sparse OPTimisation
Public Types | Public Member Functions | List of all members
sopt::details::MatrixAdjointToLinearTransform< EIGEN > Class Template Reference

Wraps a tranposed matrix into a function and its conjugate transpose. More...

#include <linear_transform.h>

Public Types

using PlainObject = typename MatrixToLinearTransform< EIGEN >::PlainObject
 

Public Member Functions

template<typename T0 >
 MatrixAdjointToLinearTransform (Eigen::MatrixBase< T0 > const &A)
 Creates from an expression. More...
 
 MatrixAdjointToLinearTransform (std::shared_ptr< EIGEN > const &x)
 Creates from a shared matrix. More...
 
void operator() (PlainObject &out, PlainObject const &x) const
 Performs operation. More...
 
MatrixToLinearTransform< EIGEN > adjoint () const
 Returns adjoint operator. More...
 

Detailed Description

template<typename EIGEN>
class sopt::details::MatrixAdjointToLinearTransform< EIGEN >

Wraps a tranposed matrix into a function and its conjugate transpose.

Definition at line 202 of file linear_transform.h.

Member Typedef Documentation

◆ PlainObject

template<typename EIGEN >
using sopt::details::MatrixAdjointToLinearTransform< EIGEN >::PlainObject = typename MatrixToLinearTransform<EIGEN>::PlainObject

Definition at line 204 of file linear_transform.h.

Constructor & Destructor Documentation

◆ MatrixAdjointToLinearTransform() [1/2]

template<typename EIGEN >
template<typename T0 >
sopt::details::MatrixAdjointToLinearTransform< EIGEN >::MatrixAdjointToLinearTransform ( Eigen::MatrixBase< T0 > const &  A)
inline

Creates from an expression.

Expression is evaluated and the result stored internally. This object owns a copy of the matrix. It might share it with a few friendly neighbors.

Definition at line 209 of file linear_transform.h.

210  : matrix(std::make_shared<EIGEN>(A)) {}

◆ MatrixAdjointToLinearTransform() [2/2]

template<typename EIGEN >
sopt::details::MatrixAdjointToLinearTransform< EIGEN >::MatrixAdjointToLinearTransform ( std::shared_ptr< EIGEN > const &  x)
inline

Creates from a shared matrix.

Definition at line 212 of file linear_transform.h.

212 : matrix(x){}

Member Function Documentation

◆ adjoint()

template<typename EIGEN >
MatrixToLinearTransform<EIGEN> sopt::details::MatrixAdjointToLinearTransform< EIGEN >::adjoint ( ) const
inline

Returns adjoint operator.

The matrix is shared.

Definition at line 225 of file linear_transform.h.

225 { return MatrixToLinearTransform<EIGEN>(matrix); }

◆ operator()()

template<typename EIGEN >
void sopt::details::MatrixAdjointToLinearTransform< EIGEN >::operator() ( PlainObject out,
PlainObject const &  x 
) const
inline

Performs operation.

Definition at line 215 of file linear_transform.h.

215  {
216 #ifndef NDEBUG
217  if ((*matrix).rows() != x.size())
218  SOPT_THROW("Input vector and matrix adjoint do not match: ")
219  << out.cols() << " rows for " << x.size() << " elements.";
220 #endif
221  out = matrix->adjoint() * x;
222  }
#define SOPT_THROW(MSG)
Definition: exception.h:46

References SOPT_THROW.


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