Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type > Class Template Reference

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

#include <CwiseTernaryOp.h>

+ Inheritance diagram for Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >:

Public Types

typedef internal::remove_all_t< Arg1Type > Arg1
 
typedef internal::remove_all_t< Arg2Type > Arg2
 
typedef internal::remove_all_t< Arg3Type > Arg3
 
typedef internal::ref_selector< Arg2Type >::type Arg2Nested
 
typedef internal::ref_selector< Arg3Type >::type Arg3Nested
 
typedef std::remove_reference_t< Arg1NestedArg1Nested_
 
typedef std::remove_reference_t< Arg2NestedArg2Nested_
 
typedef std::remove_reference_t< Arg3NestedArg3Nested_
 
- Public Types inherited from Eigen::CwiseTernaryOpImpl< TernaryOp, Arg1Type, Arg2Type, Arg3Type, internal::traits< Arg1Type >::StorageKind >
typedef internal::generic_xpr_base< CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type > >::type Base
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CwiseTernaryOp (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const TernaryOp &func=TernaryOp())
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index cols () const
 
EIGEN_DEVICE_FUNC const Arg1Nested_arg1 () const
 
EIGEN_DEVICE_FUNC const Arg2Nested_arg2 () const
 
EIGEN_DEVICE_FUNC const Arg3Nested_arg3 () const
 
EIGEN_DEVICE_FUNC const TernaryOp & functor () const
 

Public Attributes

EIGEN_STATIC_ASSERT((internal::is_same< typename internal::traits< Arg1Type >::StorageKind, typename internal::traits< Arg2Type >::StorageKind >::value), STORAGE_KIND_MUST_MATCH) EIGEN_STATIC_ASSERT((internal typedef internal::ref_selector< Arg1Type >::type Arg1Nested
 

Protected Attributes

Arg1Nested m_arg1
 
Arg2Nested m_arg2
 
Arg3Nested m_arg3
 
const TernaryOp m_functor
 

Detailed Description

template<typename TernaryOp, typename Arg1Type, typename Arg2Type, typename Arg3Type>
class Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >

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

Template Parameters
TernaryOptemplate functor implementing the operator
Arg1Typethe type of the first argument
Arg2Typethe type of the second argument
Arg3Typethe type of the third argument

This class represents an expression where a coefficient-wise ternary operator is applied to three expressions. It is the return type of ternary operators, by which we mean only those ternary operators where all three arguments are Eigen expressions. For example, the return type of betainc(matrix1, matrix2, matrix3) is a CwiseTernaryOp.

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

See also
MatrixBase::ternaryExpr(const MatrixBase<Argument2> &, const MatrixBase<Argument3> &, const CustomTernaryOp &) const, class CwiseBinaryOp, class CwiseUnaryOp, class CwiseNullaryOp

Member Typedef Documentation

◆ Arg1

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef internal::remove_all_t<Arg1Type> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg1

◆ Arg1Nested_

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef std::remove_reference_t<Arg1Nested> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg1Nested_

◆ Arg2

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef internal::remove_all_t<Arg2Type> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg2

◆ Arg2Nested

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef internal::ref_selector<Arg2Type>::type Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg2Nested

◆ Arg2Nested_

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef std::remove_reference_t<Arg2Nested> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg2Nested_

◆ Arg3

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef internal::remove_all_t<Arg3Type> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg3

◆ Arg3Nested

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef internal::ref_selector<Arg3Type>::type Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg3Nested

◆ Arg3Nested_

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
typedef std::remove_reference_t<Arg3Nested> Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg3Nested_

Constructor & Destructor Documentation

◆ CwiseTernaryOp()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::CwiseTernaryOp ( const Arg1 a1,
const Arg2 a2,
const Arg3 a3,
const TernaryOp &  func = TernaryOp() 
)
inline
117  : m_arg1(a1), m_arg2(a2), m_arg3(a3), m_functor(func) {
118  eigen_assert(a1.rows() == a2.rows() && a1.cols() == a2.cols() && a1.rows() == a3.rows() && a1.cols() == a3.cols());
119  }
#define eigen_assert(x)
Definition: Macros.h:910
Arg1Nested m_arg1
Definition: CwiseTernaryOp.h:156
Arg2Nested m_arg2
Definition: CwiseTernaryOp.h:157
Arg3Nested m_arg3
Definition: CwiseTernaryOp.h:158
const TernaryOp m_functor
Definition: CwiseTernaryOp.h:159
Definition: benchGeometry.cpp:21

References eigen_assert.

Member Function Documentation

◆ arg1()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC const Arg1Nested_& Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg1 ( ) const
inline
Returns
the first argument nested expression
147 { return m_arg1; }

References Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg1.

◆ arg2()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC const Arg2Nested_& Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg2 ( ) const
inline
Returns
the first argument nested expression
149 { return m_arg2; }

References Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg2.

◆ arg3()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC const Arg3Nested_& Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::arg3 ( ) const
inline
Returns
the third argument nested expression
151 { return m_arg3; }

References Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg3.

◆ cols()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::cols ( ) const
inline
133  {
134  // return the fixed size type if available to enable compile time
135  // optimizations
136  if (internal::traits<internal::remove_all_t<Arg1Nested>>::ColsAtCompileTime == Dynamic &&
137  internal::traits<internal::remove_all_t<Arg2Nested>>::ColsAtCompileTime == Dynamic)
138  return m_arg3.cols();
139  else if (internal::traits<internal::remove_all_t<Arg1Nested>>::ColsAtCompileTime == Dynamic &&
140  internal::traits<internal::remove_all_t<Arg3Nested>>::ColsAtCompileTime == Dynamic)
141  return m_arg2.cols();
142  else
143  return m_arg1.cols();
144  }
const int Dynamic
Definition: Constants.h:25

References Eigen::Dynamic, Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg1, Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg2, and Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg3.

Referenced by gdb.printers._MatrixEntryIterator::__next__(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenMatrixPrinter::to_string(), and gdb.printers.EigenSparseMatrixPrinter::to_string().

◆ functor()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC const TernaryOp& Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::functor ( ) const
inline
Returns
the functor representing the ternary operation
153 { return m_functor; }

References Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_functor.

◆ rows()

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::rows ( ) const
inline
121  {
122  // return the fixed size type if available to enable compile time
123  // optimizations
124  if (internal::traits<internal::remove_all_t<Arg1Nested>>::RowsAtCompileTime == Dynamic &&
125  internal::traits<internal::remove_all_t<Arg2Nested>>::RowsAtCompileTime == Dynamic)
126  return m_arg3.rows();
127  else if (internal::traits<internal::remove_all_t<Arg1Nested>>::RowsAtCompileTime == Dynamic &&
128  internal::traits<internal::remove_all_t<Arg3Nested>>::RowsAtCompileTime == Dynamic)
129  return m_arg2.rows();
130  else
131  return m_arg1.rows();
132  }

References Eigen::Dynamic, Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg1, Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg2, and Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg3.

Referenced by gdb.printers._MatrixEntryIterator::__next__(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenMatrixPrinter::to_string(), and gdb.printers.EigenSparseMatrixPrinter::to_string().

Member Data Documentation

◆ Arg1Nested

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
EIGEN_STATIC_ASSERT ((internal::is_same<typename internal::traits<Arg1Type>::StorageKind, typename internal::traits<Arg2Type>::StorageKind>::value), STORAGE_KIND_MUST_MATCH) EIGEN_STATIC_ASSERT((internal typedef internal::ref_selector<Arg1Type>::type Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::Arg1Nested

◆ m_arg1

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
Arg1Nested Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg1
protected

◆ m_arg2

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
Arg2Nested Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg2
protected

◆ m_arg3

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
Arg3Nested Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_arg3
protected

◆ m_functor

template<typename TernaryOp , typename Arg1Type , typename Arg2Type , typename Arg3Type >
const TernaryOp Eigen::CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type >::m_functor
protected

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