mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
The usage of DenseIndex is deprecated, so let's replace DenseIndex by Index
This commit is contained in:
@@ -32,7 +32,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
||||
enum { AmbientDimAtCompileTime = _AmbientDim };
|
||||
typedef _Scalar Scalar;
|
||||
typedef NumTraits<Scalar> ScalarTraits;
|
||||
typedef DenseIndex Index;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef typename ScalarTraits::Real RealScalar;
|
||||
typedef typename ScalarTraits::NonInteger NonInteger;
|
||||
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
};
|
||||
typedef _Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef DenseIndex Index;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType;
|
||||
typedef Matrix<Scalar,Index(AmbientDimAtCompileTime)==Dynamic
|
||||
? Dynamic
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
};
|
||||
typedef _Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef DenseIndex Index;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> VectorType;
|
||||
|
||||
/** Default constructor without initialization */
|
||||
|
||||
@@ -724,7 +724,6 @@ template<typename Other>
|
||||
struct quaternionbase_assign_impl<Other,3,3>
|
||||
{
|
||||
typedef typename Other::Scalar Scalar;
|
||||
typedef DenseIndex Index;
|
||||
template<class Derived> static inline void run(QuaternionBase<Derived>& q, const Other& mat)
|
||||
{
|
||||
using std::sqrt;
|
||||
@@ -742,13 +741,13 @@ struct quaternionbase_assign_impl<Other,3,3>
|
||||
}
|
||||
else
|
||||
{
|
||||
DenseIndex i = 0;
|
||||
Index i = 0;
|
||||
if (mat.coeff(1,1) > mat.coeff(0,0))
|
||||
i = 1;
|
||||
if (mat.coeff(2,2) > mat.coeff(i,i))
|
||||
i = 2;
|
||||
DenseIndex j = (i+1)%3;
|
||||
DenseIndex k = (j+1)%3;
|
||||
Index j = (i+1)%3;
|
||||
Index k = (j+1)%3;
|
||||
|
||||
t = sqrt(mat.coeff(i,i)-mat.coeff(j,j)-mat.coeff(k,k) + Scalar(1.0));
|
||||
q.coeffs().coeffRef(i) = Scalar(0.5) * t;
|
||||
|
||||
Reference in New Issue
Block a user