Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType > Class Template Reference

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

#include <src/eigen/Eigen/src/Core/CwiseBinaryOp.h>

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

Public Types

typedef internal::remove_all< BinaryOp >::type Functor
 
typedef internal::remove_all< LhsType >::type Lhs
 
typedef internal::remove_all< RhsType >::type Rhs
 
typedef CwiseBinaryOpImpl< BinaryOp, LhsType, RhsType, typenameinternal::cwise_promote_storage_type< typenameinternal::traits< LhsType >::StorageKind, typenameinternal::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 _LhsNestedlhs () const
 
EIGEN_DEVICE_FUNC const _RhsNestedrhs () 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

Member Typedef Documentation

◆ _LhsNested

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

◆ _RhsNested

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

◆ Base

template<typename BinaryOp , typename LhsType , typename RhsType >
typedef CwiseBinaryOpImpl<BinaryOp,LhsType,RhsType,typenameinternal::cwise_promote_storage_type<typenameinternal::traits<LhsType>::StorageKind,typenameinternal::traits<Rhs>::StorageKind,BinaryOp>::ret>::Base Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::Base

◆ Functor

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

◆ Lhs

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

◆ LhsNested

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

◆ Rhs

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

◆ RhsNested

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

Constructor & Destructor Documentation

◆ CwiseBinaryOp()

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
105 : m_lhs(aLhs), m_rhs(aRhs), m_functor(func)
106 {
107 EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,typename Lhs::Scalar,typename Rhs::Scalar);
108 // require the sizes to match
110 eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());
111 }
#define eigen_assert(x)
Definition Macros.h:579
#define EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:189
#define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP, LHS, RHS)
Definition XprHelper.h:815
internal::remove_all< RhsType >::type Rhs
Definition CwiseBinaryOp.h:89
const BinaryOp m_functor
Definition CwiseBinaryOp.h:143
LhsNested m_lhs
Definition CwiseBinaryOp.h:141
internal::remove_all< LhsType >::type Lhs
Definition CwiseBinaryOp.h:88
RhsNested m_rhs
Definition CwiseBinaryOp.h:142

References eigen_assert, EIGEN_CHECK_BINARY_COMPATIBILIY, and EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE.

Member Function Documentation

◆ cols()

template<typename BinaryOp , typename LhsType , typename RhsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::cols ( ) const
inline
122 {
123 // return the fixed size type if available to enable compile time optimizations
124 if (internal::traits<typename internal::remove_all<LhsNested>::type>::ColsAtCompileTime==Dynamic)
125 return m_rhs.cols();
126 else
127 return m_lhs.cols();
128 }
T type
Definition Meta.h:78
const int Dynamic
Definition Constants.h:21

References Eigen::Dynamic, Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_lhs, and Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_rhs.

◆ functor()

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
138{ return m_functor; }

References Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_functor.

◆ lhs()

template<typename BinaryOp , typename LhsType , typename RhsType >
EIGEN_DEVICE_FUNC const _LhsNested & Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::lhs ( ) const
inline

◆ rhs()

template<typename BinaryOp , typename LhsType , typename RhsType >
EIGEN_DEVICE_FUNC const _RhsNested & Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::rhs ( ) const
inline

◆ rows()

template<typename BinaryOp , typename LhsType , typename RhsType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::rows ( ) const
inline
114 {
115 // return the fixed size type if available to enable compile time optimizations
116 if (internal::traits<typename internal::remove_all<LhsNested>::type>::RowsAtCompileTime==Dynamic)
117 return m_rhs.rows();
118 else
119 return m_lhs.rows();
120 }

References Eigen::Dynamic, Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_lhs, and Eigen::CwiseBinaryOp< BinaryOp, LhsType, RhsType >::m_rhs.

Member Data Documentation

◆ m_functor

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

◆ m_lhs

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

◆ m_rhs

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

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