21template <
typename OtherDerived>
22EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived, OtherDerived,
23 internal::scalar_product_op)
24 cwiseProduct(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
25 return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived, OtherDerived, internal::scalar_product_op)(derived(), other.derived());
28template <
typename OtherDerived>
29using CwiseBinaryEqualReturnType =
30 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const OtherDerived>;
31template <
typename OtherDerived>
32using CwiseBinaryNotEqualReturnType =
33 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const OtherDerived>;
34template <
typename OtherDerived>
35using CwiseBinaryLessReturnType =
36 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const OtherDerived>;
37template <
typename OtherDerived>
38using CwiseBinaryGreaterReturnType =
39 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const OtherDerived>;
40template <
typename OtherDerived>
41using CwiseBinaryLessOrEqualReturnType =
42 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const OtherDerived>;
43template <
typename OtherDerived>
44using CwiseBinaryGreaterOrEqualReturnType =
45 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const OtherDerived>;
59template <
typename OtherDerived>
60EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryEqualReturnType<OtherDerived> cwiseEqual(
61 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
62 return CwiseBinaryEqualReturnType<OtherDerived>(derived(), other.derived());
77template <
typename OtherDerived>
78EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryNotEqualReturnType<OtherDerived> cwiseNotEqual(
79 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
80 return CwiseBinaryNotEqualReturnType<OtherDerived>(derived(), other.derived());
84template <
typename OtherDerived>
85EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryLessReturnType<OtherDerived> cwiseLess(
86 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
87 return CwiseBinaryLessReturnType<OtherDerived>(derived(), other.derived());
91template <
typename OtherDerived>
92EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryGreaterReturnType<OtherDerived> cwiseGreater(
93 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
94 return CwiseBinaryGreaterReturnType<OtherDerived>(derived(), other.derived());
98template <
typename OtherDerived>
99EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryLessOrEqualReturnType<OtherDerived> cwiseLessOrEqual(
100 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
101 return CwiseBinaryLessOrEqualReturnType<OtherDerived>(derived(), other.derived());
105template <
typename OtherDerived>
106EIGEN_DEVICE_FUNC
constexpr inline const CwiseBinaryGreaterOrEqualReturnType<OtherDerived> cwiseGreaterOrEqual(
107 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
108 return CwiseBinaryGreaterOrEqualReturnType<OtherDerived>(derived(), other.derived());
118template <
int NaNPropagation = PropagateFast,
typename OtherDerived>
119EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const
120 CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
121 cwiseMin(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
122 return CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>(
123 derived(), other.derived());
130template <
int NaNPropagation = PropagateFast>
131EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const
132 CwiseBinaryOp<internal::scalar_min_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const ConstantReturnType>
133 cwiseMin(
const Scalar& other)
const {
134 return cwiseMin<NaNPropagation>(Derived::Constant(rows(), cols(), other));
144template <
int NaNPropagation = PropagateFast,
typename OtherDerived>
145EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const
146 CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
147 cwiseMax(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
148 return CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const OtherDerived>(
149 derived(), other.derived());
156template <
int NaNPropagation = PropagateFast>
157EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const
158 CwiseBinaryOp<internal::scalar_max_op<Scalar, Scalar, NaNPropagation>,
const Derived,
const ConstantReturnType>
159 cwiseMax(
const Scalar& other)
const {
160 return cwiseMax<NaNPropagation>(Derived::Constant(rows(), cols(), other));
170template <
typename OtherDerived>
171EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const
172 CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
173 cwiseQuotient(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
174 return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>(derived(),
178using CwiseScalarEqualReturnType =
179 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const ConstantReturnType>;
180using CwiseScalarNotEqualReturnType =
181 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const ConstantReturnType>;
182using CwiseScalarLessReturnType =
183 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const ConstantReturnType>;
184using CwiseScalarGreaterReturnType =
185 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const ConstantReturnType>;
186using CwiseScalarLessOrEqualReturnType =
187 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const ConstantReturnType>;
188using CwiseScalarGreaterOrEqualReturnType =
189 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const ConstantReturnType>;
200EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarEqualReturnType cwiseEqual(
const Scalar& s)
const {
201 return CwiseScalarEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
213EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarNotEqualReturnType cwiseNotEqual(
const Scalar& s)
const {
214 return CwiseScalarNotEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
218EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarLessReturnType cwiseLess(
const Scalar& s)
const {
219 return CwiseScalarLessReturnType(derived(), Derived::Constant(rows(), cols(), s));
223EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarGreaterReturnType cwiseGreater(
const Scalar& s)
const {
224 return CwiseScalarGreaterReturnType(derived(), Derived::Constant(rows(), cols(), s));
228EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarLessOrEqualReturnType cwiseLessOrEqual(
const Scalar& s)
const {
229 return CwiseScalarLessOrEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
233EIGEN_DEVICE_FUNC
constexpr inline const CwiseScalarGreaterOrEqualReturnType cwiseGreaterOrEqual(
234 const Scalar& s)
const {
235 return CwiseScalarGreaterOrEqualReturnType(derived(), Derived::Constant(rows(), cols(), s));
238template <
typename OtherDerived>
239using CwiseBinaryTypedEqualReturnType =
240 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ, true>,
const Derived,
const OtherDerived>;
241template <
typename OtherDerived>
242using CwiseBinaryTypedNotEqualReturnType =
243 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ, true>,
const Derived,
const OtherDerived>;
244template <
typename OtherDerived>
245using CwiseBinaryTypedLessReturnType =
246 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT, true>,
const Derived,
const OtherDerived>;
247template <
typename OtherDerived>
248using CwiseBinaryTypedGreaterReturnType =
249 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT, true>,
const Derived,
const OtherDerived>;
250template <
typename OtherDerived>
251using CwiseBinaryTypedLessOrEqualReturnType =
252 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE, true>,
const Derived,
const OtherDerived>;
253template <
typename OtherDerived>
254using CwiseBinaryTypedGreaterOrEqualReturnType =
255 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE, true>,
const Derived,
const OtherDerived>;
257template <
typename OtherDerived>
258EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedEqualReturnType<OtherDerived> cwiseTypedEqual(
259 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
260 return CwiseBinaryTypedEqualReturnType<OtherDerived>(derived(), other.derived());
263template <
typename OtherDerived>
264EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedNotEqualReturnType<OtherDerived>
265cwiseTypedNotEqual(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
266 return CwiseBinaryTypedNotEqualReturnType<OtherDerived>(derived(), other.derived());
269template <
typename OtherDerived>
270EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedLessReturnType<OtherDerived> cwiseTypedLess(
271 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
272 return CwiseBinaryTypedLessReturnType<OtherDerived>(derived(), other.derived());
275template <
typename OtherDerived>
276EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedGreaterReturnType<OtherDerived> cwiseTypedGreater(
277 const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
278 return CwiseBinaryTypedGreaterReturnType<OtherDerived>(derived(), other.derived());
281template <
typename OtherDerived>
282EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedLessOrEqualReturnType<OtherDerived>
283cwiseTypedLessOrEqual(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
284 return CwiseBinaryTypedLessOrEqualReturnType<OtherDerived>(derived(), other.derived());
287template <
typename OtherDerived>
288EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseBinaryTypedGreaterOrEqualReturnType<OtherDerived>
289cwiseTypedGreaterOrEqual(
const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived>& other)
const {
290 return CwiseBinaryTypedGreaterOrEqualReturnType<OtherDerived>(derived(), other.derived());
293using CwiseScalarTypedEqualReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ, true>,
294 const Derived,
const ConstantReturnType>;
295using CwiseScalarTypedNotEqualReturnType =
296 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ, true>,
const Derived,
297 const ConstantReturnType>;
298using CwiseScalarTypedLessReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT, true>,
299 const Derived,
const ConstantReturnType>;
300using CwiseScalarTypedGreaterReturnType = CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT, true>,
301 const Derived,
const ConstantReturnType>;
302using CwiseScalarTypedLessOrEqualReturnType =
303 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE, true>,
const Derived,
304 const ConstantReturnType>;
305using CwiseScalarTypedGreaterOrEqualReturnType =
306 CwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE, true>,
const Derived,
307 const ConstantReturnType>;
309EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedEqualReturnType
310cwiseTypedEqual(
const Scalar& s)
const {
311 return CwiseScalarTypedEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
314EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedNotEqualReturnType
315cwiseTypedNotEqual(
const Scalar& s)
const {
316 return CwiseScalarTypedNotEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
319EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedLessReturnType
320cwiseTypedLess(
const Scalar& s)
const {
321 return CwiseScalarTypedLessReturnType(derived(), ConstantReturnType(rows(), cols(), s));
324EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedGreaterReturnType
325cwiseTypedGreater(
const Scalar& s)
const {
326 return CwiseScalarTypedGreaterReturnType(derived(), ConstantReturnType(rows(), cols(), s));
329EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedLessOrEqualReturnType
330cwiseTypedLessOrEqual(
const Scalar& s)
const {
331 return CwiseScalarTypedLessOrEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));
334EIGEN_DEVICE_FUNC
constexpr EIGEN_STRONG_INLINE
const CwiseScalarTypedGreaterOrEqualReturnType
335cwiseTypedGreaterOrEqual(
const Scalar& s)
const {
336 return CwiseScalarTypedGreaterOrEqualReturnType(derived(), ConstantReturnType(rows(), cols(), s));