Public Types | Public Member Functions | Protected Attributes | List of all members
CwiseUnaryOp< UnaryOp, XprType > Class Template Reference

Generic expression where a coefficient-wise unary operator is applied to an expression. More...

#include <CwiseUnaryOp.h>

+ Inheritance diagram for CwiseUnaryOp< UnaryOp, XprType >:

Public Types

typedef CwiseUnaryOpImpl
< UnaryOp, XprType, typename
internal::traits< XprType >
::StorageKind >::Base 
Base

Public Member Functions

Index cols () const
 CwiseUnaryOp (const XprType &xpr, const UnaryOp &func=UnaryOp())
const UnaryOp & functor () const
const internal::remove_all
< typename XprType::Nested >
::type & 
nestedExpression () const
internal::remove_all< typename
XprType::Nested >::type & 
nestedExpression ()
Index rows () const

Protected Attributes

const UnaryOp m_functor
XprType::Nested m_xpr

Detailed Description

template<typename UnaryOp, typename XprType>
class Eigen::CwiseUnaryOp< UnaryOp, XprType >

Generic expression where a coefficient-wise unary operator is applied to an expression.

Parameters
UnaryOptemplate functor implementing the operator
XprTypethe type of the expression to which we are applying the unary operator

This class represents an expression where a unary operator is applied to an expression. It is the return type of all operations taking exactly 1 input expression, regardless of the presence of other inputs such as scalars. For example, the operator* in the expression 3*matrix is considered unary, because only the right-hand side is an expression, and its return type is a specialization of CwiseUnaryOp.

Most of the time, this is the only way that it is used, so you typically don't have to name CwiseUnaryOp types explicitly.

See Also
MatrixBase::unaryExpr(const CustomUnaryOp &) const, class CwiseBinaryOp, class CwiseNullaryOp

Member Typedef Documentation

typedef CwiseUnaryOpImpl<UnaryOp, XprType,typename internal::traits<XprType>::StorageKind>::Base Base

Constructor & Destructor Documentation

CwiseUnaryOp ( const XprType &  xpr,
const UnaryOp &  func = UnaryOp() 
)
inline

Member Function Documentation

Index cols ( ) const
inline
const UnaryOp& functor ( ) const
inline
Returns
the functor representing the unary operation

References CwiseUnaryOp< UnaryOp, XprType >::m_functor.

const internal::remove_all<typename XprType::Nested>::type& nestedExpression ( ) const
inline
Returns
the nested expression

References CwiseUnaryOp< UnaryOp, XprType >::m_xpr.

internal::remove_all<typename XprType::Nested>::type& nestedExpression ( )
inline
Returns
the nested expression

References CwiseUnaryOp< UnaryOp, XprType >::m_xpr.

Index rows ( ) const
inline

Member Data Documentation

const UnaryOp m_functor
protected
XprType::Nested m_xpr
protected

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