Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Attributes

CwiseUnaryOp< UnaryOp, XprType > Class Template Reference


Detailed Description

template<typename UnaryOp, typename XprType>
class 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

Definition at line 72 of file CwiseUnaryOp.h.

#include <src/Core/CwiseUnaryOp.h>

Inheritance diagram for CwiseUnaryOp< UnaryOp, XprType >:
Inheritance graph
[legend]

List of all members.

Public Types

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

Public Member Functions

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

Protected Attributes

const XprType::Nested m_xpr
const UnaryOp m_functor

Member Typedef Documentation

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

Definition at line 77 of file CwiseUnaryOp.h.


Constructor & Destructor Documentation

template<typename UnaryOp, typename XprType>
CwiseUnaryOp< UnaryOp, XprType >::CwiseUnaryOp ( const XprType &  xpr,
const UnaryOp &  func = UnaryOp() 
) [inline]

Definition at line 80 of file CwiseUnaryOp.h.


Member Function Documentation

template<typename UnaryOp, typename XprType>
EIGEN_STRONG_INLINE Index CwiseUnaryOp< UnaryOp, XprType >::cols ( ) const [inline]
template<typename UnaryOp, typename XprType>
const UnaryOp& CwiseUnaryOp< UnaryOp, XprType >::functor ( ) const [inline]
Returns:
the functor representing the unary operation

Definition at line 87 of file CwiseUnaryOp.h.

References CwiseUnaryOp< UnaryOp, XprType >::m_functor.

Referenced by internal::blas_traits< CwiseUnaryOp< scalar_multiple_op< Scalar >, NestedXpr > >::extractScalarFactor().

template<typename UnaryOp, typename XprType>
const internal::remove_all<typename XprType::Nested>::type& CwiseUnaryOp< UnaryOp, XprType >::nestedExpression ( ) const [inline]
template<typename UnaryOp, typename XprType>
internal::remove_all<typename XprType::Nested>::type& CwiseUnaryOp< UnaryOp, XprType >::nestedExpression ( ) [inline]
Returns:
the nested expression

Definition at line 95 of file CwiseUnaryOp.h.

References CwiseUnaryOp< UnaryOp, XprType >::m_xpr.

template<typename UnaryOp, typename XprType>
EIGEN_STRONG_INLINE Index CwiseUnaryOp< UnaryOp, XprType >::rows ( ) const [inline]

Member Data Documentation

template<typename UnaryOp, typename XprType>
const UnaryOp CwiseUnaryOp< UnaryOp, XprType >::m_functor [protected]

Definition at line 99 of file CwiseUnaryOp.h.

Referenced by CwiseUnaryOp< UnaryOp, XprType >::functor().

template<typename UnaryOp, typename XprType>
const XprType::Nested CwiseUnaryOp< UnaryOp, XprType >::m_xpr [protected]



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011