MOAB  4.9.3pre
ArrayCwiseBinaryOps.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR)
#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR)
#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR)
#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR)

Functions

template<typename OtherDerived >
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const 
EIGEN_CWISE_PRODUCT_RETURN_TYPE (Derived, OtherDerived) operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const
CwiseBinaryOp
< internal::scalar_quotient_op
< Scalar >, const Derived,
const OtherDerived > 
operator/ (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename ExponentDerived >
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const
CwiseBinaryOp
< internal::scalar_binary_pow_op
< Scalar, typename
ExponentDerived::Scalar >
, const Derived, const
ExponentDerived > 
pow (const ArrayBase< ExponentDerived > &exponents) const
EIGEN_DEVICE_FUNC const
CwiseUnaryOp
< internal::scalar_add_op
< Scalar >, const Derived > 
operator+ (const Scalar &scalar) const
EIGEN_DEVICE_FUNC friend const
CwiseUnaryOp
< internal::scalar_add_op
< Scalar >, const Derived > 
operator+ (const Scalar &scalar, const EIGEN_CURRENT_STORAGE_BASE_CLASS< Derived > &other)
EIGEN_DEVICE_FUNC const
CwiseUnaryOp
< internal::scalar_sub_op
< Scalar >, const Derived > 
operator- (const Scalar &scalar) const
EIGEN_DEVICE_FUNC friend const
CwiseUnaryOp
< internal::scalar_rsub_op
< Scalar >, const Derived > 
operator- (const Scalar &scalar, const EIGEN_CURRENT_STORAGE_BASE_CLASS< Derived > &other)
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const
CwiseBinaryOp
< internal::scalar_boolean_and_op,
const Derived, const
OtherDerived > 
operator&& (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const
CwiseBinaryOp
< internal::scalar_boolean_or_op,
const Derived, const
OtherDerived > 
operator|| (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const

Define Documentation

#define EIGEN_MAKE_CWISE_COMP_OP (   OP,
  COMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
  return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \
}\
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
  return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \
} \
EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s, const Derived& d) { \
  return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \
}
#define EIGEN_MAKE_CWISE_COMP_OP (   OP,
  COMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
  return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \
}\
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
  return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \
} \
EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s, const Derived& d) { \
  return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \
}

Definition at line 96 of file ArrayCwiseBinaryOps.h.

#define EIGEN_MAKE_CWISE_COMP_R_OP (   OP,
  R_OP,
  RCOMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
  return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \
} \
EIGEN_DEVICE_FUNC \
inline const RCmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
  return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \
} \
friend inline const Cmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s, const Derived& d) { \
  return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \
}

Definition at line 114 of file ArrayCwiseBinaryOps.h.

#define EIGEN_MAKE_CWISE_COMP_R_OP (   OP,
  R_OP,
  RCOMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
  return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \
} \
EIGEN_DEVICE_FUNC \
inline const RCmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
  return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \
} \
friend inline const Cmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s, const Derived& d) { \
  return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \
}

Function Documentation

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE ( Derived  ,
OtherDerived   
) const
Returns:
an expression of the coefficient wise product of *this and other
See also:
MatrixBase::cwiseProduct

Definition at line 7 of file ArrayCwiseBinaryOps.h.

{
  return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
}
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived> operator&& ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const [inline]
Returns:
an expression of the coefficient-wise && operator of *this and other
Warning:
this operator is for expression of bool only.

Example:

Output:

See also:
operator||(), select()

Definition at line 257 of file ArrayCwiseBinaryOps.h.

{
  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
  return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
}
EIGEN_DEVICE_FUNC const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived> operator+ ( const Scalar &  scalar) const [inline]
Returns:
an expression of the coefficient-wise < operator of *this and other

Example:

Output:

See also:
all(), any(), operator>(), operator<=()
Returns:
an expression of the coefficient-wise <= operator of *this and other

Example:

Output:

See also:
all(), any(), operator>=(), operator<()
Returns:
an expression of the coefficient-wise > operator of *this and other

Example:

Output:

See also:
all(), any(), operator>=(), operator<()
Returns:
an expression of the coefficient-wise >= operator of *this and other

Example:

Output:

See also:
all(), any(), operator>(), operator<=()
Returns:
an expression of the coefficient-wise == operator of *this and other
Warning:
this performs an exact comparison, which is generally a bad idea with floating-point types. In order to check for equality between two vectors or matrices with floating-point coefficients, it is generally a far better idea to use a fuzzy comparison as provided by isApprox() and isMuchSmallerThan().

Example:

Output:

See also:
all(), any(), isApprox(), isMuchSmallerThan()
Returns:
an expression of the coefficient-wise != operator of *this and other
Warning:
this performs an exact comparison, which is generally a bad idea with floating-point types. In order to check for equality between two vectors or matrices with floating-point coefficients, it is generally a far better idea to use a fuzzy comparison as provided by isApprox() and isMuchSmallerThan().

Example:

Output:

See also:
all(), any(), isApprox(), isMuchSmallerThan()
Returns:
an expression of *this with each coeff incremented by the constant scalar

Example:

Output:

See also:
operator+=(), operator-()

Definition at line 212 of file ArrayCwiseBinaryOps.h.

{
  return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
}
EIGEN_DEVICE_FUNC friend const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived> operator+ ( const Scalar &  scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS< Derived > &  other 
) [inline]

Definition at line 219 of file ArrayCwiseBinaryOps.h.

{
  return other + scalar;
}
EIGEN_DEVICE_FUNC const CwiseUnaryOp<internal::scalar_sub_op<Scalar>, const Derived> operator- ( const Scalar &  scalar) const [inline]
Returns:
an expression of *this with each coeff decremented by the constant scalar

Example:

Output:

See also:
operator+(), operator-=()

Definition at line 233 of file ArrayCwiseBinaryOps.h.

{
  return CwiseUnaryOp<internal::scalar_sub_op<Scalar>, const Derived>(derived(), internal::scalar_sub_op<Scalar>(scalar));;
}
EIGEN_DEVICE_FUNC friend const CwiseUnaryOp<internal::scalar_rsub_op<Scalar>, const Derived> operator- ( const Scalar &  scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS< Derived > &  other 
) [inline]

Definition at line 240 of file ArrayCwiseBinaryOps.h.

{
  return CwiseUnaryOp<internal::scalar_rsub_op<Scalar>, const Derived>(other.derived(), internal::scalar_rsub_op<Scalar>(scalar));;
}
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived> operator/ ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
Returns:
an expression of the coefficient wise quotient of *this and other
See also:
MatrixBase::cwiseQuotient

Definition at line 20 of file ArrayCwiseBinaryOps.h.

{
  return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived> operator|| ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const [inline]
Returns:
an expression of the coefficient-wise || operator of *this and other
Warning:
this operator is for expression of bool only.

Example:

Output:

See also:
operator&&(), select()

Definition at line 276 of file ArrayCwiseBinaryOps.h.

{
  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
  return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
}
template<typename ExponentDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_binary_pow_op<Scalar, typename ExponentDerived::Scalar>, const Derived, const ExponentDerived> pow ( const ArrayBase< ExponentDerived > &  exponents) const
Returns:
an expression of the coefficient-wise power of *this to the given array of exponents.

This function computes the coefficient-wise power.

Example:

Output:

Definition at line 87 of file ArrayCwiseBinaryOps.h.

{
  return CwiseBinaryOp<internal::scalar_binary_pow_op<Scalar, typename ExponentDerived::Scalar>, const Derived, const ExponentDerived>(
    this->derived(),
    exponents.derived()
  );
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines