ArrayCwiseBinaryOps.h
Go to the documentation of this file.
00001 
00005 template<typename OtherDerived>
00006 EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)
00007 operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
00008 {
00009   return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
00010 }
00011 
00016 template<typename OtherDerived>
00017 EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
00018 operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
00019 {
00020   return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
00021 }
00022 
00030 EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
00031 
00032 
00036 EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived,
00037                                         const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
00038 (min)(const Scalar &other) const
00039 {
00040   return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
00041 }
00042 
00050 EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
00051 
00052 
00056 EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived,
00057                                         const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
00058 (max)(const Scalar &other) const
00059 {
00060   return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
00061 }
00062 
00070 EIGEN_MAKE_CWISE_BINARY_OP(operator<,std::less)
00071 
00072 
00079 EIGEN_MAKE_CWISE_BINARY_OP(operator<=,std::less_equal)
00080 
00088 EIGEN_MAKE_CWISE_BINARY_OP(operator>,std::greater)
00089 
00097 EIGEN_MAKE_CWISE_BINARY_OP(operator>=,std::greater_equal)
00098 
00111 EIGEN_MAKE_CWISE_BINARY_OP(operator==,std::equal_to)
00112 
00125 EIGEN_MAKE_CWISE_BINARY_OP(operator!=,std::not_equal_to)
00126 
00127 // scalar addition
00128 
00136 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
00137 operator+(const Scalar& scalar) const
00138 {
00139   return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
00140 }
00141 
00142 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
00143 operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
00144 {
00145   return other + scalar;
00146 }
00147 
00155 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
00156 operator-(const Scalar& scalar) const
00157 {
00158   return *this + (-scalar);
00159 }
00160 
00161 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> >
00162 operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
00163 {
00164   return (-other) + scalar;
00165 }
00166 
00176 template<typename OtherDerived>
00177 inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
00178 operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
00179 {
00180   EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
00181                       THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
00182   return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
00183 }
00184 
00194 template<typename OtherDerived>
00195 inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
00196 operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
00197 {
00198   EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
00199                       THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
00200   return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
00201 }


win_eigen
Author(s): Daniel Stonier
autogenerated on Mon Oct 6 2014 12:24:08