5 template<
typename OtherDerived>
6 EIGEN_STRONG_INLINE
const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)
7 operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 9 return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
16 template<
typename OtherDerived>
17 EIGEN_STRONG_INLINE
const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
18 operator/(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 20 return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>(derived(), other.derived());
30 EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
36 EIGEN_STRONG_INLINE const CwiseBinaryOp<
internal::scalar_min_op<Scalar>, const Derived,
37 const CwiseNullaryOp<
internal::scalar_constant_op<Scalar>, PlainObject> >
38 #ifdef EIGEN_PARSED_BY_DOXYGEN 43 (
const Scalar &other)
const 45 return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
55 EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
61 EIGEN_STRONG_INLINE const CwiseBinaryOp<
internal::scalar_max_op<Scalar>, const Derived,
62 const CwiseNullaryOp<
internal::scalar_constant_op<Scalar>, PlainObject> >
63 #ifdef EIGEN_PARSED_BY_DOXYGEN 68 (
const Scalar &other)
const 70 return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
74 #define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR) \ 75 template<typename OtherDerived> \ 76 EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \ 77 OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \ 79 return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \ 81 typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \ 82 typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \ 83 EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \ 84 OP(const Scalar& s) const { \ 85 return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \ 87 friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \ 88 OP(const Scalar& s, const Derived& d) { \ 89 return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \ 92 #define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR) \ 93 template<typename OtherDerived> \ 94 EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \ 95 OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \ 97 return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \ 100 inline const RCmp ## RCOMPARATOR ## ReturnType \ 101 OP(const Scalar& s) const { \ 102 return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \ 104 friend inline const Cmp ## RCOMPARATOR ## ReturnType \ 105 OP(const Scalar& s, const Derived& d) { \ 106 return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \ 117 EIGEN_MAKE_CWISE_COMP_OP(
operator<, LT)
126 EIGEN_MAKE_CWISE_COMP_OP(operator<=, LE)
135 EIGEN_MAKE_CWISE_COMP_R_OP(operator>, operator<, LT)
144 EIGEN_MAKE_CWISE_COMP_R_OP(operator>=, operator<=, LE)
158 EIGEN_MAKE_CWISE_COMP_OP(operator==, EQ)
172 EIGEN_MAKE_CWISE_COMP_OP(operator!=, NEQ)
174 #undef EIGEN_MAKE_CWISE_COMP_OP 175 #undef EIGEN_MAKE_CWISE_COMP_R_OP 186 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
187 operator+(
const Scalar& scalar)
const 189 return CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
192 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
193 operator+(
const Scalar& scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
195 return other + scalar;
205 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const Derived>
206 operator-(
const Scalar& scalar)
const 208 return *
this + (-scalar);
211 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>,
const CwiseUnaryOp<internal::scalar_opposite_op<Scalar>,
const Derived> >
212 operator-(
const Scalar& scalar,
const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
214 return (-other) + scalar;
226 template<
typename OtherDerived>
227 inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
228 operator&&(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 230 EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
231 THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
232 return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
244 template<
typename OtherDerived>
245 inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
246 operator||(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other)
const 248 EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
249 THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
250 return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
Definition: Eigen_Colamd.h:54