ArrayCwiseBinaryOps.h
Go to the documentation of this file.
1 
5 template<typename OtherDerived>
7 operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
8 {
9  return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
10 }
11 
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
19 {
20  return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
21 }
22 
30 EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
31 
32 
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
39 min
40 #else
41 (min)
42 #endif
43 (const Scalar &other) const
44 {
45  return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
46 }
47 
55 EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
56 
57 
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
64 max
65 #else
66 (max)
67 #endif
68 (const Scalar &other) const
69 {
70  return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
71 }
72 
80 EIGEN_MAKE_CWISE_BINARY_OP(operator<,std::less)
81 
82 
89 EIGEN_MAKE_CWISE_BINARY_OP(operator<=,std::less_equal)
90 
91 
98 EIGEN_MAKE_CWISE_BINARY_OP(operator>,std::greater)
99 
100 
107 EIGEN_MAKE_CWISE_BINARY_OP(operator>=,std::greater_equal)
108 
109 
121 EIGEN_MAKE_CWISE_BINARY_OP(operator==,std::equal_to)
122 
123 
135 EIGEN_MAKE_CWISE_BINARY_OP(operator!=,std::not_equal_to)
136 
137 // scalar addition
138 
139 
146 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
147 operator+(const Scalar& scalar) const
148 {
149  return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
150 }
151 
152 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
153 operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
154 {
155  return other + scalar;
156 }
157 
165 inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
166 operator-(const Scalar& scalar) const
167 {
168  return *this + (-scalar);
169 }
170 
171 friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> >
172 operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
173 {
174  return (-other) + scalar;
175 }
176 
186 template<typename OtherDerived>
187 inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
188 operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
189 {
190  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
191  THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
192  return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
193 }
194 
204 template<typename OtherDerived>
205 inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
206 operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
207 {
208  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
209  THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
210  return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
211 }
friend const ScalarAddReturnType operator+(const Scalar &scalar, const Cwise &mat)
Definition: Cwise.h:101
#define EIGEN_STRONG_INLINE
#define EIGEN_CURRENT_STORAGE_BASE_CLASS
Definition: ArrayBase.h:106
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:111
const CwiseBinaryOp< internal::scalar_boolean_and_op, const Derived, const OtherDerived > operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD, FUNCTOR)
const CwiseBinaryOp< internal::scalar_boolean_or_op, const Derived, const OtherDerived > operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
const CwiseUnaryOp< internal::scalar_add_op< Scalar >, const Derived > operator-(const Scalar &scalar) const
EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived, OtherDerived) operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
int min(int a, int b)
EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const


tuw_aruco
Author(s): Lukas Pfeifhofer
autogenerated on Mon Jun 10 2019 15:40:45