mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Rename isnan to isNaN
This commit is contained in:
parent
f89fcefa79
commit
fb68b149cb
@ -214,7 +214,7 @@ EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(sqrt, Sqrt)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(round, Round)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(floor, Floor)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(ceil, Ceil)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isnan, Isnan)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isNaN, IsNaN)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isinf, Isinf)
|
||||
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(square, Sqr)
|
||||
|
@ -77,7 +77,7 @@ struct default_packet_traits
|
||||
HasRound = 0,
|
||||
HasFloor = 0,
|
||||
HasCeil = 0,
|
||||
HasIsnan = 0,
|
||||
HasIsNaN = 0,
|
||||
HasIsinf = 0
|
||||
};
|
||||
};
|
||||
@ -395,9 +395,9 @@ Packet pfloor(const Packet& a) { using numext::floor; return floor(a); }
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
Packet pceil(const Packet& a) { using numext::ceil; return ceil(a); }
|
||||
|
||||
/** \internal \returns the isnan of \a a (coeff-wise) */
|
||||
/** \internal \returns whether \a a is NaN (coeff-wise) */
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
Packet pisnan(const Packet& a) { using numext::isnan; return isnan(a); }
|
||||
Packet pisNaN(const Packet& a) { using numext::isNaN; return isNaN(a); }
|
||||
|
||||
/** \internal \returns the isinf of \a a (coeff-wise) */
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
|
@ -59,7 +59,7 @@ namespace Eigen
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(round,scalar_round_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(floor,scalar_floor_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(ceil,scalar_ceil_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isnan,scalar_isnan_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isNaN,scalar_isNaN_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isinf,scalar_isinf_op)
|
||||
|
||||
template<typename Derived>
|
||||
|
@ -741,7 +741,7 @@ bool (isfinite)(const std::complex<T>& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool (isnan)(const T& x)
|
||||
bool (isNaN)(const T& x)
|
||||
{
|
||||
using std::isnan;
|
||||
return isnan(x);
|
||||
@ -749,7 +749,7 @@ bool (isnan)(const T& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool (isnan)(const std::complex<T>& x)
|
||||
bool (isNaN)(const std::complex<T>& x)
|
||||
{
|
||||
using std::real;
|
||||
using std::imag;
|
||||
|
@ -566,23 +566,23 @@ struct functor_traits<scalar_ceil_op<Scalar> >
|
||||
};
|
||||
|
||||
/** \internal
|
||||
* \brief Template functor to compute the isnan of a scalar
|
||||
* \sa class CwiseUnaryOp, ArrayBase::isnan()
|
||||
* \brief Template functor to compute whether a scalar is NaN
|
||||
* \sa class CwiseUnaryOp, ArrayBase::isNaN()
|
||||
*/
|
||||
template<typename Scalar> struct scalar_isnan_op {
|
||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_isnan_op)
|
||||
template<typename Scalar> struct scalar_isNaN_op {
|
||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_isNaN_op)
|
||||
typedef bool result_type;
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::isnan(a); }
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::isNaN(a); }
|
||||
template<typename Packet>
|
||||
EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
|
||||
{ return internal::pisnan(a); }
|
||||
{ return internal::pisNaN(a); }
|
||||
};
|
||||
template<typename Scalar>
|
||||
struct functor_traits<scalar_isnan_op<Scalar> >
|
||||
struct functor_traits<scalar_isNaN_op<Scalar> >
|
||||
{
|
||||
enum {
|
||||
Cost = NumTraits<Scalar>::MulCost,
|
||||
PacketAccess = packet_traits<Scalar>::HasIsnan
|
||||
PacketAccess = packet_traits<Scalar>::HasIsNaN
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@ typedef CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived> CubeReturn
|
||||
typedef CwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived> RoundReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived> FloorReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived> CeilReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isnan_op<Scalar>, const Derived> IsnanReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isNaN_op<Scalar>, const Derived> IsNaNReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived> IsinfReturnType;
|
||||
|
||||
/** \returns an expression of the coefficient-wise absolute value of \c *this
|
||||
@ -364,17 +364,17 @@ ceil() const
|
||||
return CeilReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise isnan of *this.
|
||||
/** \returns an expression of the coefficient-wise isNaN of *this.
|
||||
*
|
||||
* Example: \include Cwise_isnan.cpp
|
||||
* Output: \verbinclude Cwise_isnan.out
|
||||
* Example: \include Cwise_isNaN.cpp
|
||||
* Output: \verbinclude Cwise_isNaN.out
|
||||
*
|
||||
* \sa isinf()
|
||||
*/
|
||||
inline const IsnanReturnType
|
||||
isnan() const
|
||||
inline const IsNaNReturnType
|
||||
isNaN() const
|
||||
{
|
||||
return IsnanReturnType(derived());
|
||||
return IsNaNReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise isinf of *this.
|
||||
@ -382,7 +382,7 @@ isnan() const
|
||||
* Example: \include Cwise_isinf.cpp
|
||||
* Output: \verbinclude Cwise_isinf.out
|
||||
*
|
||||
* \sa isnan()
|
||||
* \sa isNaN()
|
||||
*/
|
||||
inline const IsinfReturnType
|
||||
isinf() const
|
||||
|
@ -213,7 +213,7 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
||||
VERIFY_IS_APPROX(m1.round(), round(m1));
|
||||
VERIFY_IS_APPROX(m1.floor(), floor(m1));
|
||||
VERIFY_IS_APPROX(m1.ceil(), ceil(m1));
|
||||
VERIFY_IS_APPROX(m1.isnan(), isnan(m1));
|
||||
VERIFY_IS_APPROX(m1.isNaN(), isNaN(m1));
|
||||
VERIFY_IS_APPROX(m1.isinf(), isinf(m1));
|
||||
VERIFY_IS_APPROX(m1.square(), square(m1));
|
||||
|
||||
@ -281,7 +281,7 @@ template<typename ArrayType> void array_complex(const ArrayType& m)
|
||||
VERIFY_IS_APPROX(m1.round(), round(m1));
|
||||
VERIFY_IS_APPROX(m1.floor(), floor(m1));
|
||||
VERIFY_IS_APPROX(m1.ceil(), ceil(m1));
|
||||
VERIFY_IS_APPROX(m1.isnan(), isnan(m1));
|
||||
VERIFY_IS_APPROX(m1.isNaN(), isNaN(m1));
|
||||
VERIFY_IS_APPROX(m1.isinf(), isinf(m1));
|
||||
VERIFY_IS_APPROX(m1.square(), square(m1));
|
||||
VERIFY_IS_APPROX(m1.sin(), sin(m1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user