1c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient wise product of \c *this and \a other 2c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 3c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa MatrixBase::cwiseProduct 4c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 5c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathtemplate<typename OtherDerived> 6c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived) 7c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const 8c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 9c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived()); 10c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 11c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 12c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient wise quotient of \c *this and \a other 13c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 14c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa MatrixBase::cwiseQuotient 15c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 16c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathtemplate<typename OtherDerived> 17c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived> 18c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const 19c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 20c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived()); 21c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 22c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 23c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise min of \c *this and \a other 24c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 25c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_min.cpp 26c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_min.out 27c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 28c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa max() 29c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 30c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op) 31c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 32c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise min of \c *this and scalar \a other 33c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 34c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa max() 35c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 367faaa9f3f0df9d23790277834d426c3d992ac3baCarlos HernandezEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, 377faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > 387faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#ifdef EIGEN_PARSED_BY_DOXYGEN 397faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandezmin 407faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#else 417faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez(min) 427faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#endif 437faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez(const Scalar &other) const 44c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 45c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return (min)(Derived::PlainObject::Constant(rows(), cols(), other)); 46c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 47c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 48c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise max of \c *this and \a other 49c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 50c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_max.cpp 51c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_max.out 52c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 53c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa min() 54c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 55c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op) 56c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 57c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise max of \c *this and scalar \a other 58c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 59c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa min() 60c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 617faaa9f3f0df9d23790277834d426c3d992ac3baCarlos HernandezEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, 627faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > 637faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#ifdef EIGEN_PARSED_BY_DOXYGEN 647faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandezmax 657faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#else 667faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez(max) 677faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez#endif 687faaa9f3f0df9d23790277834d426c3d992ac3baCarlos Hernandez(const Scalar &other) const 69c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 70c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return (max)(Derived::PlainObject::Constant(rows(), cols(), other)); 71c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 72c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 73c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise \< operator of *this and \a other 74c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 75c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_less.cpp 76c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_less.out 77c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 78c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), operator>(), operator<=() 79c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 80c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator<,std::less) 81c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 82c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise \<= operator of *this and \a other 83c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 84c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_less_equal.cpp 85c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_less_equal.out 86c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 87c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), operator>=(), operator<() 88c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 89c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator<=,std::less_equal) 90c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 91c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise \> operator of *this and \a other 92c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 93c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_greater.cpp 94c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_greater.out 95c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 96c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), operator>=(), operator<() 97c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 98c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator>,std::greater) 99c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 100c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise \>= operator of *this and \a other 101c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 102c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_greater_equal.cpp 103c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_greater_equal.out 104c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 105c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), operator>(), operator<=() 106c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 107c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator>=,std::greater_equal) 108c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 109c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise == operator of *this and \a other 110c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 111c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \warning this performs an exact comparison, which is generally a bad idea with floating-point types. 112c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * In order to check for equality between two vectors or matrices with floating-point coefficients, it is 113c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * generally a far better idea to use a fuzzy comparison as provided by isApprox() and 114c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * isMuchSmallerThan(). 115c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 116c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_equal_equal.cpp 117c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_equal_equal.out 118c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 119c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), isApprox(), isMuchSmallerThan() 120c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 121c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator==,std::equal_to) 122c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 123c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise != operator of *this and \a other 124c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 125c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \warning this performs an exact comparison, which is generally a bad idea with floating-point types. 126c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * In order to check for equality between two vectors or matrices with floating-point coefficients, it is 127c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * generally a far better idea to use a fuzzy comparison as provided by isApprox() and 128c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * isMuchSmallerThan(). 129c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 130c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_not_equal.cpp 131c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_not_equal.out 132c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 133c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa all(), any(), isApprox(), isMuchSmallerThan() 134c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 135c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan KamathEIGEN_MAKE_CWISE_BINARY_OP(operator!=,std::not_equal_to) 136c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 137c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath// scalar addition 138c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 139c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of \c *this with each coeff incremented by the constant \a scalar 140c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 141c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_plus.cpp 142c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_plus.out 143c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 144c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa operator+=(), operator-() 145c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 146c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathinline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived> 147c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator+(const Scalar& scalar) const 148c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 149c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar)); 150c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 151c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 152c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathfriend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived> 153c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other) 154c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 155c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return other + scalar; 156c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 157c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 158c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of \c *this with each coeff decremented by the constant \a scalar 159c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 160c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_minus.cpp 161c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_minus.out 162c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 163c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa operator+(), operator-=() 164c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 165c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathinline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived> 166c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator-(const Scalar& scalar) const 167c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 168c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return *this + (-scalar); 169c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 170c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 171c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathfriend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> > 172c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other) 173c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 174c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return (-other) + scalar; 175c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 176c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 177c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise && operator of *this and \a other 178c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 179c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \warning this operator is for expression of bool only. 180c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 181c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_boolean_and.cpp 182c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_boolean_and.out 183c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 184c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa operator||(), select() 185c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 186c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathtemplate<typename OtherDerived> 187c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathinline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived> 188c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const 189c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 190c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value), 191c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL); 192c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived()); 193c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 194c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath 195c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath/** \returns an expression of the coefficient-wise || operator of *this and \a other 196c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 197c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \warning this operator is for expression of bool only. 198c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 199c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Example: \include Cwise_boolean_or.cpp 200c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * Output: \verbinclude Cwise_boolean_or.out 201c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * 202c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath * \sa operator&&(), select() 203c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath */ 204c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathtemplate<typename OtherDerived> 205c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathinline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived> 206c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamathoperator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const 207c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath{ 208c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value), 209c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL); 210c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived()); 211c981c48f5bc9aefeffc0bcb0cc3934c2fae179ddNarayan Kamath} 212