Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType > Class Template Reference

Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector. More...

#include <CwiseUnaryView.h>

+ Inheritance diagram for Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >:

Public Types

typedef internal::CwiseUnaryViewImpl< ViewOp, MatrixType, StrideType, typename internal::traits< MatrixType >::StorageKind >::Base Base
 
typedef internal::ref_selector< MatrixType >::non_const_type MatrixTypeNested
 
typedef internal::remove_all_t< MatrixTypeNestedExpression
 
- Public Types inherited from Eigen::internal::CwiseUnaryViewImpl< ViewOp, MatrixType, StrideType, internal::traits< MatrixType >::StorageKind >
typedef generic_xpr_base< CwiseUnaryView< ViewOp, MatrixType, StrideType > >::type Base
 

Public Member Functions

EIGEN_DEVICE_FUNC CwiseUnaryView (MatrixType &mat, const ViewOp &func=ViewOp())
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC const ViewOp & functor () const
 
EIGEN_DEVICE_FUNC const internal::remove_all_t< MatrixTypeNested > & nestedExpression () const
 
EIGEN_DEVICE_FUNC std::remove_reference_t< MatrixTypeNested > & nestedExpression ()
 

Protected Attributes

MatrixTypeNested m_matrix
 
ViewOp m_functor
 

Detailed Description

template<typename ViewOp, typename MatrixType, typename StrideType>
class Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >

Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.

Template Parameters
ViewOptemplate functor implementing the view
MatrixTypethe type of the matrix we are applying the unary operator

This class represents a lvalue expression of a generic unary view operator of a matrix or a vector. It is the return type of real() and imag(), and most of the time this is the only way it is used.

See also
MatrixBase::unaryViewExpr(const CustomUnaryOp &) const, class CwiseUnaryOp

Member Typedef Documentation

◆ Base

template<typename ViewOp , typename MatrixType , typename StrideType >
typedef internal::CwiseUnaryViewImpl<ViewOp, MatrixType, StrideType, typename internal::traits<MatrixType>::StorageKind>::Base Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::Base

◆ MatrixTypeNested

template<typename ViewOp , typename MatrixType , typename StrideType >
typedef internal::ref_selector<MatrixType>::non_const_type Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::MatrixTypeNested

◆ NestedExpression

template<typename ViewOp , typename MatrixType , typename StrideType >
typedef internal::remove_all_t<MatrixType> Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::NestedExpression

Constructor & Destructor Documentation

◆ CwiseUnaryView()

template<typename ViewOp , typename MatrixType , typename StrideType >
EIGEN_DEVICE_FUNC Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::CwiseUnaryView ( MatrixType mat,
const ViewOp &  func = ViewOp() 
)
inlineexplicit
144  : m_matrix(mat), m_functor(func) {}
ViewOp m_functor
Definition: CwiseUnaryView.h:162
MatrixTypeNested m_matrix
Definition: CwiseUnaryView.h:161
Definition: benchGeometry.cpp:21

Member Function Documentation

◆ cols()

◆ functor()

template<typename ViewOp , typename MatrixType , typename StrideType >
EIGEN_DEVICE_FUNC const ViewOp& Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::functor ( ) const
inline
Returns
the functor representing unary operation
152 { return m_functor; }

◆ nestedExpression() [1/2]

template<typename ViewOp , typename MatrixType , typename StrideType >
EIGEN_DEVICE_FUNC std::remove_reference_t<MatrixTypeNested>& Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::nestedExpression ( )
inline
Returns
the nested expression
158 { return m_matrix; }

◆ nestedExpression() [2/2]

template<typename ViewOp , typename MatrixType , typename StrideType >
EIGEN_DEVICE_FUNC const internal::remove_all_t<MatrixTypeNested>& Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::nestedExpression ( ) const
inline
Returns
the nested expression
155 { return m_matrix; }

◆ rows()

Member Data Documentation

◆ m_functor

template<typename ViewOp , typename MatrixType , typename StrideType >
ViewOp Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::m_functor
protected

◆ m_matrix

template<typename ViewOp , typename MatrixType , typename StrideType >
MatrixTypeNested Eigen::CwiseUnaryView< ViewOp, MatrixType, StrideType >::m_matrix
protected

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