20template <
typename OtherDerived>
21EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived, OtherDerived, product)
22 cwiseProduct(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
23 return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived, OtherDerived, product)(derived(), other.derived());
26template <
typename OtherDerived>
27using CwiseBinaryEqualReturnType =
28 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const OtherDerived>;
29template <
typename OtherDerived>
30using CwiseBinaryNotEqualReturnType =
31 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const OtherDerived>;
32template <
typename OtherDerived>
33using CwiseBinaryLessReturnType =
34 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const OtherDerived>;
35template <
typename OtherDerived>
36using CwiseBinaryGreaterReturnType =
37 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const OtherDerived>;
38template <
typename OtherDerived>
39using CwiseBinaryLessOrEqualReturnType =
40 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const OtherDerived>;
41template <
typename OtherDerived>
42using CwiseBinaryGreaterOrEqualReturnType =
43 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const OtherDerived>;
57template <
typename OtherDerived>
58EIGEN_DEVICE_FUNC
inline const CwiseBinaryEqualReturnType<OtherDerived> cwiseEqual(
59 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
60 return CwiseBinaryEqualReturnType<OtherDerived>(derived(), other.derived());
75template <
typename OtherDerived>
76EIGEN_DEVICE_FUNC
inline const CwiseBinaryNotEqualReturnType<OtherDerived> cwiseNotEqual(
77 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
78 return CwiseBinaryNotEqualReturnType<OtherDerived>(derived(), other.derived());
82template <
typename OtherDerived>
83EIGEN_DEVICE_FUNC
inline const CwiseBinaryLessReturnType<OtherDerived> cwiseLess(
84 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
85 return CwiseBinaryLessReturnType<OtherDerived>(derived(), other.derived());
89template <
typename OtherDerived>
90EIGEN_DEVICE_FUNC
inline const CwiseBinaryGreaterReturnType<OtherDerived> cwiseGreater(
91 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
92 return CwiseBinaryGreaterReturnType<OtherDerived>(derived(), other.derived());
96template <
typename OtherDerived>
97EIGEN_DEVICE_FUNC
inline const CwiseBinaryLessOrEqualReturnType<OtherDerived> cwiseLessOrEqual(
98 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
99 return CwiseBinaryLessOrEqualReturnType<OtherDerived>(derived(), other.derived());
103template <
typename OtherDerived>
104EIGEN_DEVICE_FUNC
inline const CwiseBinaryGreaterOrEqualReturnType<OtherDerived> cwiseGreaterOrEqual(
105 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
106 return CwiseBinaryGreaterOrEqualReturnType<OtherDerived>(derived(), other.derived());
116template <
int NaNPropagation = PropagateFast,
typename OtherDerived>
117EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const
118 CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
119 cwiseMin(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
120 return CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>(
121 derived(), other.derived());
128template <
int NaNPropagation = PropagateFast>
129EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const
130 CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const ConstantReturnType>
131 cwiseMin(
const Scalar& other)
const {
132 return cwiseMin<NaNPropagation>(Derived::Constant(rows(), cols(), other));
142template <
int NaNPropagation = PropagateFast,
typename OtherDerived>
143EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const
144 CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
145 cwiseMax(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
146 return CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>(
147 derived(), other.derived());
154template <
int NaNPropagation = PropagateFast>
155EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const
156 CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const ConstantReturnType>
157 cwiseMax(
const Scalar& other)
const {
158 return cwiseMax<NaNPropagation>(Derived::Constant(rows(), cols(), other));
168template <
typename OtherDerived>
169EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const
170 CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
171 cwiseQuotient(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
172 return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>(derived(),
176using CwiseScalarEqualReturnType =
177 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const ConstantReturnType>;
178using CwiseScalarNotEqualReturnType =
179 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const ConstantReturnType>;
180using CwiseScalarLessReturnType =
181 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const ConstantReturnType>;
182using CwiseScalarGreaterReturnType =
183 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const ConstantReturnType>;
184using CwiseScalarLessOrEqualReturnType =
185 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const ConstantReturnType>;
186using CwiseScalarGreaterOrEqualReturnType =
187 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const ConstantReturnType>;
198EIGEN_DEVICE_FUNC
inline const CwiseScalarEqualReturnType cwiseEqual(
const Scalar& s)
const {
199 return CwiseScalarEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
211EIGEN_DEVICE_FUNC
inline const CwiseScalarNotEqualReturnType cwiseNotEqual(
const Scalar& s)
const {
212 return CwiseScalarNotEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
216EIGEN_DEVICE_FUNC
inline const CwiseScalarLessReturnType cwiseLess(
const Scalar& s)
const {
217 return CwiseScalarLessReturnType(derived(), Derived::Constant(rows(), cols(), s));
221EIGEN_DEVICE_FUNC
inline const CwiseScalarGreaterReturnType cwiseGreater(
const Scalar& s)
const {
222 return CwiseScalarGreaterReturnType(derived(), Derived::Constant(rows(), cols(), s));
226EIGEN_DEVICE_FUNC
inline const CwiseScalarLessOrEqualReturnType cwiseLessOrEqual(
const Scalar& s)
const {
227 return CwiseScalarLessOrEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
231EIGEN_DEVICE_FUNC
inline const CwiseScalarGreaterOrEqualReturnType cwiseGreaterOrEqual(
const Scalar& s)
const {
232 return CwiseScalarGreaterOrEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
235template <
typename OtherDerived>
236using CwiseBinaryTypedEqualReturnType =
237 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ, true>,
const Derived,
const OtherDerived>;
238template <
typename OtherDerived>
239using CwiseBinaryTypedNotEqualReturnType =
240 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ, true>,
const Derived,
const OtherDerived>;
241template <
typename OtherDerived>
242using CwiseBinaryTypedLessReturnType =
243 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT, true>,
const Derived,
const OtherDerived>;
244template <
typename OtherDerived>
245using CwiseBinaryTypedGreaterReturnType =
246 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT, true>,
const Derived,
const OtherDerived>;
247template <
typename OtherDerived>
248using CwiseBinaryTypedLessOrEqualReturnType =
249 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE, true>,
const Derived,
const OtherDerived>;
250template <
typename OtherDerived>
251using CwiseBinaryTypedGreaterOrEqualReturnType =
252 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE, true>,
const Derived,
const OtherDerived>;
254template <
typename OtherDerived>
255EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedEqualReturnType<OtherDerived> cwiseTypedEqual(
256 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
257 return CwiseBinaryTypedEqualReturnType<OtherDerived>(derived(), other.derived());
260template <
typename OtherDerived>
261EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedNotEqualReturnType<OtherDerived> cwiseTypedNotEqual(
262 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
263 return CwiseBinaryTypedNotEqualReturnType<OtherDerived>(derived(), other.derived());
266template <
typename OtherDerived>
267EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedLessReturnType<OtherDerived> cwiseTypedLess(
268 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
269 return CwiseBinaryTypedLessReturnType<OtherDerived>(derived(), other.derived());
272template <
typename OtherDerived>
273EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedGreaterReturnType<OtherDerived> cwiseTypedGreater(
274 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
275 return CwiseBinaryTypedGreaterReturnType<OtherDerived>(derived(), other.derived());
278template <
typename OtherDerived>
279EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedLessOrEqualReturnType<OtherDerived> cwiseTypedLessOrEqual(
280 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
281 return CwiseBinaryTypedLessOrEqualReturnType<OtherDerived>(derived(), other.derived());
284template <
typename OtherDerived>
285EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseBinaryTypedGreaterOrEqualReturnType<OtherDerived>
286cwiseTypedGreaterOrEqual(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
287 return CwiseBinaryTypedGreaterOrEqualReturnType<OtherDerived>(derived(), other.derived());
290using CwiseScalarTypedEqualReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ, true>,
291 const Derived,
const ConstantReturnType>;
292using CwiseScalarTypedNotEqualReturnType =
293 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ, true>,
const Derived,
294 const ConstantReturnType>;
295using CwiseScalarTypedLessReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT, true>,
296 const Derived,
const ConstantReturnType>;
297using CwiseScalarTypedGreaterReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT, true>,
298 const Derived,
const ConstantReturnType>;
299using CwiseScalarTypedLessOrEqualReturnType =
300 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE, true>,
const Derived,
301 const ConstantReturnType>;
302using CwiseScalarTypedGreaterOrEqualReturnType =
303 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE, true>,
const Derived,
304 const ConstantReturnType>;
306EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedEqualReturnType cwiseTypedEqual(
const Scalar& s)
const {
307 return CwiseScalarTypedEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
310EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedNotEqualReturnType
311cwiseTypedNotEqual(
const Scalar& s)
const {
312 return CwiseScalarTypedNotEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
315EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedLessReturnType cwiseTypedLess(
const Scalar& s)
const {
316 return CwiseScalarTypedLessReturnType(derived(), ConstantReturnType(rows(), cols(), s));
319EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedGreaterReturnType cwiseTypedGreater(
const Scalar& s)
const {
320 return CwiseScalarTypedGreaterReturnType(derived(), ConstantReturnType(rows(), cols(), s));
323EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedLessOrEqualReturnType
324cwiseTypedLessOrEqual(
const Scalar& s)
const {
325 return CwiseScalarTypedLessOrEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
328EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CwiseScalarTypedGreaterOrEqualReturnType
329cwiseTypedGreaterOrEqual(
const Scalar& s)
const {
330 return CwiseScalarTypedGreaterOrEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));