5 template<
typename OtherDerived>
7 EIGEN_STRONG_INLINE
const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)
8 operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 10 return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
17 template<
typename OtherDerived>
19 EIGEN_STRONG_INLINE
const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
20 operator/(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 22 return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>(derived(), other.derived());
32 EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
39 EIGEN_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));
58 EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
65 EIGEN_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));
84 template<
typename ExponentDerived>
85 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
86 const CwiseBinaryOp<internal::scalar_binary_pow_op<Scalar, typename ExponentDerived::Scalar>,
const Derived,
const ExponentDerived>
87 pow(
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) \ 97 template<typename OtherDerived> \ 98 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \ 99 OP(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()); \ 103 typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \ 104 typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \ 105 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \ 106 OP(const Scalar& s) const { \ 107 return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \ 109 EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \ 110 OP(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) \ 115 template<typename OtherDerived> \ 116 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \ 117 OP(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()); \ 122 inline const RCmp ## RCOMPARATOR ## ReturnType \ 123 OP(const Scalar& s) const { \ 124 return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \ 126 friend inline const Cmp ## RCOMPARATOR ## ReturnType \ 127 OP(const Scalar& s, const Derived& d) { \ 128 return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \ 140 EIGEN_MAKE_CWISE_COMP_OP(
operator<, LT)
149 EIGEN_MAKE_CWISE_COMP_OP(operator<=, LE)
158 EIGEN_MAKE_CWISE_COMP_R_OP(operator>, operator<, LT)
167 EIGEN_MAKE_CWISE_COMP_R_OP(operator>=, operator<=, LE)
181 EIGEN_MAKE_CWISE_COMP_OP(operator==, EQ)
195 EIGEN_MAKE_CWISE_COMP_OP(operator!=, NEQ)
198 #undef EIGEN_MAKE_CWISE_COMP_OP 199 #undef EIGEN_MAKE_CWISE_COMP_R_OP 211 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
212 operator+(
const Scalar& scalar)
const 214 return CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
218 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
219 operator+(
const Scalar& scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
221 return other + scalar;
232 inline const CwiseUnaryOp<internal::scalar_sub_op<Scalar>,
const Derived>
233 operator-(
const Scalar& scalar)
const 235 return CwiseUnaryOp<internal::scalar_sub_op<Scalar>,
const Derived>(derived(), internal::scalar_sub_op<Scalar>(scalar));;
239 friend inline const CwiseUnaryOp<internal::scalar_rsub_op<Scalar>,
const Derived>
240 operator-(
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));;
254 template<
typename OtherDerived>
256 inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
257 operator&&(
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());
273 template<
typename OtherDerived>
275 inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
276 operator||(
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());
Definition: Eigen_Colamd.h:54