5template<
typename OtherDerived>
7EIGEN_STRONG_INLINE
const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)
8operator*(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const
10 return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
17template<
typename OtherDerived>
19EIGEN_STRONG_INLINE
const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
20operator/(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const
22 return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>(derived(), other.derived());
32EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
39EIGEN_STRONG_INLINE
const CwiseBinaryOp<internal::scalar_min_op<Scalar>,
const Derived,
40 const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
41#ifdef EIGEN_PARSED_BY_DOXYGEN
46(
const Scalar &other)
const
48 return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
58EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
65EIGEN_STRONG_INLINE
const CwiseBinaryOp<internal::scalar_max_op<Scalar>,
const Derived,
66 const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
67#ifdef EIGEN_PARSED_BY_DOXYGEN
72(
const Scalar &other)
const
74 return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
84template<
typename ExponentDerived>
85EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
86const CwiseBinaryOp<internal::scalar_binary_pow_op<Scalar, typename ExponentDerived::Scalar>,
const Derived,
const ExponentDerived>
87pow(
const ArrayBase<ExponentDerived>& exponents)
const
89 return CwiseBinaryOp<internal::scalar_binary_pow_op<Scalar, typename ExponentDerived::Scalar>,
const Derived,
const ExponentDerived>(
96#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR) \
97template<typename OtherDerived> \
98EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \
99OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
101 return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \
103typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \
104typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \
105EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \
106OP(const Scalar& s) const { \
107 return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \
109EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \
110OP(const Scalar& s, const Derived& d) { \
111 return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \
114#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR) \
115template<typename OtherDerived> \
116EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \
117OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
119 return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \
122inline const RCmp ## RCOMPARATOR ## ReturnType \
123OP(const Scalar& s) const { \
124 return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \
126friend inline const Cmp ## RCOMPARATOR ## ReturnType \
127OP(const Scalar& s, const Derived& d) { \
128 return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \
140EIGEN_MAKE_CWISE_COMP_OP(
operator<, LT)
149EIGEN_MAKE_CWISE_COMP_OP(
operator<=, LE)
158EIGEN_MAKE_CWISE_COMP_R_OP(
operator>,
operator<, LT)
167EIGEN_MAKE_CWISE_COMP_R_OP(
operator>=,
operator<=, LE)
181EIGEN_MAKE_CWISE_COMP_OP(
operator==, EQ)
195EIGEN_MAKE_CWISE_COMP_OP(
operator!=, NEQ)
198#undef EIGEN_MAKE_CWISE_COMP_OP
199#undef EIGEN_MAKE_CWISE_COMP_R_OP
211inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
212operator+(
const Scalar& scalar)
const
214 return CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
218friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
219operator+(
const Scalar& scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
221 return other + scalar;
232inline const CwiseUnaryOp<internal::scalar_sub_op<Scalar>,
const Derived>
233operator-(
const Scalar& scalar)
const
235 return CwiseUnaryOp<internal::scalar_sub_op<Scalar>,
const Derived>(derived(), internal::scalar_sub_op<Scalar>(scalar));;
239friend inline const CwiseUnaryOp<internal::scalar_rsub_op<Scalar>,
const Derived>
240operator-(
const Scalar& scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
242 return CwiseUnaryOp<internal::scalar_rsub_op<Scalar>,
const Derived>(other.derived(), internal::scalar_rsub_op<Scalar>(scalar));;
254template<
typename OtherDerived>
256inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
257operator&&(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const
259 EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
260 THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
261 return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
273template<
typename OtherDerived>
275inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
276operator||(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const
278 EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
279 THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
280 return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());