MOAB  4.9.3pre
Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType > Class Template Reference

Generic expression where a coefficient-wise binary operator is applied to two expressions. More...

#include <CwiseBinaryOp.h>

Inheritance diagram for Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >:
Collaboration diagram for Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >:

List of all members.

Public Types

typedef internal::remove_all
< LhsType >::type 
Lhs
typedef internal::remove_all
< RhsType >::type 
Rhs
typedef CwiseBinaryOpImpl
< BinaryOp, LhsType, RhsType,
typename
internal::cwise_promote_storage_type
< typename internal::traits
< LhsType >::StorageKind,
typename internal::traits< Rhs >
::StorageKind, BinaryOp >::ret >
::Base 
Base
typedef internal::ref_selector
< LhsType >::type 
LhsNested
typedef internal::ref_selector
< RhsType >::type 
RhsNested
typedef
internal::remove_reference
< LhsNested >::type 
_LhsNested
typedef
internal::remove_reference
< RhsNested >::type 
_RhsNested

Public Member Functions

EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 
CwiseBinaryOp (const Lhs &aLhs, const Rhs &aRhs, const BinaryOp &func=BinaryOp())
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Index 
rows () const
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Index 
cols () const
EIGEN_DEVICE_FUNC const
_LhsNested
lhs () const
EIGEN_DEVICE_FUNC const
_RhsNested
rhs () const
EIGEN_DEVICE_FUNC const BinaryOp & functor () const

Protected Attributes

LhsNested m_lhs
RhsNested m_rhs
const BinaryOp m_functor

Detailed Description

template<typename BinaryOp, typename LhsType, typename RhsType>
class Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >

Generic expression where a coefficient-wise binary operator is applied to two expressions.

Template Parameters:
BinaryOptemplate functor implementing the operator
LhsTypethe type of the left-hand side
RhsTypethe type of the right-hand side

This class represents an expression where a coefficient-wise binary operator is applied to two expressions. It is the return type of binary operators, by which we mean only those binary operators where both the left-hand side and the right-hand side are Eigen expressions. For example, the return type of matrix1+matrix2 is a CwiseBinaryOp.

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

See also:
MatrixBase::binaryExpr(const MatrixBase<OtherDerived> &,const CustomBinaryOp &) const, class CwiseUnaryOp, class CwiseNullaryOp

Definition at line 77 of file CwiseBinaryOp.h.


Member Typedef Documentation

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::remove_reference<LhsNested>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::_LhsNested

Definition at line 99 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::remove_reference<RhsNested>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::_RhsNested

Definition at line 100 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef CwiseBinaryOpImpl< BinaryOp, LhsType, RhsType, typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind, typename internal::traits<Rhs>::StorageKind, BinaryOp>::ret>::Base Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::Base
template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::remove_all<LhsType>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::Lhs

Definition at line 87 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::ref_selector<LhsType>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::LhsNested

Definition at line 97 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::remove_all<RhsType>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::Rhs

Definition at line 88 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
typedef internal::ref_selector<RhsType>::type Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::RhsNested

Definition at line 98 of file CwiseBinaryOp.h.


Constructor & Destructor Documentation

template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::CwiseBinaryOp ( const Lhs aLhs,
const Rhs aRhs,
const BinaryOp &  func = BinaryOp() 
) [inline]

Definition at line 103 of file CwiseBinaryOp.h.

      : m_lhs(aLhs), m_rhs(aRhs), m_functor(func)
    {
      EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,typename Lhs::Scalar,typename Rhs::Scalar);
      // require the sizes to match
      EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
      eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());
    }

Member Function Documentation

template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::cols ( ) const [inline]

Definition at line 121 of file CwiseBinaryOp.h.

                                           {
      // return the fixed size type if available to enable compile time optimizations
      if (internal::traits<typename internal::remove_all<LhsNested>::type>::ColsAtCompileTime==Dynamic)
        return m_rhs.cols();
      else
        return m_lhs.cols();
    }
template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC const BinaryOp& Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::functor ( ) const [inline]
Returns:
the functor representing the binary operation

Definition at line 137 of file CwiseBinaryOp.h.

{ return m_functor; }
template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC const _LhsNested& Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::lhs ( ) const [inline]
Returns:
the left hand side nested expression

Definition at line 131 of file CwiseBinaryOp.h.

{ return m_lhs; }
template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC const _RhsNested& Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::rhs ( ) const [inline]
Returns:
the right hand side nested expression

Definition at line 134 of file CwiseBinaryOp.h.

{ return m_rhs; }
template<typename BinaryOp, typename LhsType, typename RhsType>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::rows ( ) const [inline]

Definition at line 113 of file CwiseBinaryOp.h.

                                           {
      // return the fixed size type if available to enable compile time optimizations
      if (internal::traits<typename internal::remove_all<LhsNested>::type>::RowsAtCompileTime==Dynamic)
        return m_rhs.rows();
      else
        return m_lhs.rows();
    }

Member Data Documentation

template<typename BinaryOp, typename LhsType, typename RhsType>
const BinaryOp Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_functor [protected]

Definition at line 142 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
LhsNested Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_lhs [protected]

Definition at line 140 of file CwiseBinaryOp.h.

template<typename BinaryOp, typename LhsType, typename RhsType>
RhsNested Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_rhs [protected]

Definition at line 141 of file CwiseBinaryOp.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines