mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix min/max nan-propagation for scalar "other".
Copied input type from `EIGEN_MAKE_CWISE_BINARY_OP`.
Fixes #2362.
(cherry picked from commit 03d4cbb307)
This commit is contained in:
committed by
Antonio Sánchez
parent
96007cae8c
commit
6b6ba41269
@@ -38,7 +38,7 @@ min
|
|||||||
#else
|
#else
|
||||||
(min)
|
(min)
|
||||||
#endif
|
#endif
|
||||||
(const OtherDerived &other) const
|
(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,7 @@ max
|
|||||||
#else
|
#else
|
||||||
(max)
|
(max)
|
||||||
#endif
|
#endif
|
||||||
(const OtherDerived &other) const
|
(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NaNPropagation>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user