mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Fixed compiler warning on implicit integer conversion by separating index type for matrix and permutation matrix which may not be equal.
This commit is contained in:
parent
75e269c77b
commit
3bd31e21b5
@ -19,18 +19,19 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template <typename Scalar,int Rows, int Cols, typename Index>
|
||||
template <typename Scalar,int Rows, int Cols, typename PermIndex>
|
||||
void lmqrsolv(
|
||||
Matrix<Scalar,Rows,Cols> &s,
|
||||
const PermutationMatrix<Dynamic,Dynamic,Index> &iPerm,
|
||||
const PermutationMatrix<Dynamic,Dynamic,PermIndex> &iPerm,
|
||||
const Matrix<Scalar,Dynamic,1> &diag,
|
||||
const Matrix<Scalar,Dynamic,1> &qtb,
|
||||
Matrix<Scalar,Dynamic,1> &x,
|
||||
Matrix<Scalar,Dynamic,1> &sdiag)
|
||||
{
|
||||
typedef typename Matrix<Scalar,Rows,Cols>::Index Index;
|
||||
|
||||
/* Local variables */
|
||||
Index i, j, k, l;
|
||||
Index i, j, k;
|
||||
Scalar temp;
|
||||
Index n = s.cols();
|
||||
Matrix<Scalar,Dynamic,1> wa(n);
|
||||
@ -52,7 +53,7 @@ void lmqrsolv(
|
||||
|
||||
/* prepare the row of d to be eliminated, locating the */
|
||||
/* diagonal element using p from the qr factorization. */
|
||||
l = iPerm.indices()(j);
|
||||
const PermIndex l = iPerm.indices()(j);
|
||||
if (diag[l] == 0.)
|
||||
break;
|
||||
sdiag.tail(n-j).setZero();
|
||||
|
Loading…
Reference in New Issue
Block a user