From 3411146984316c97f56543333a46f47aeb7f9d35 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 21 Mar 2014 16:04:53 +0600 Subject: Update Eigen to version 3.2.1 Main purpose of this is to have SparseLU solver which we can use now as a replacement to opennl library. --- extern/Eigen3/Eigen/src/LU/PartialPivLU.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extern/Eigen3/Eigen/src/LU/PartialPivLU.h') diff --git a/extern/Eigen3/Eigen/src/LU/PartialPivLU.h b/extern/Eigen3/Eigen/src/LU/PartialPivLU.h index c9ff9dd5a36..740ee694c45 100644 --- a/extern/Eigen3/Eigen/src/LU/PartialPivLU.h +++ b/extern/Eigen3/Eigen/src/LU/PartialPivLU.h @@ -242,7 +242,7 @@ struct partial_lu_impl const Index cols = lu.cols(); const Index size = (std::min)(rows,cols); nb_transpositions = 0; - int first_zero_pivot = -1; + Index first_zero_pivot = -1; for(Index k = 0; k < size; ++k) { Index rrows = rows-k-1; @@ -253,7 +253,7 @@ struct partial_lu_impl = lu.col(k).tail(rows-k).cwiseAbs().maxCoeff(&row_of_biggest_in_col); row_of_biggest_in_col += k; - row_transpositions[k] = row_of_biggest_in_col; + row_transpositions[k] = PivIndex(row_of_biggest_in_col); if(biggest_in_corner != RealScalar(0)) { @@ -318,7 +318,7 @@ struct partial_lu_impl } nb_transpositions = 0; - int first_zero_pivot = -1; + Index first_zero_pivot = -1; for(Index k = 0; k < size; k+=blockSize) { Index bs = (std::min)(size-k,blockSize); // actual size of the block @@ -386,6 +386,9 @@ void partial_lu_inplace(MatrixType& lu, TranspositionType& row_transpositions, t template PartialPivLU& PartialPivLU::compute(const MatrixType& matrix) { + // the row permutation is stored as int indices, so just to be sure: + eigen_assert(matrix.rows()::highest()); + m_lu = matrix; eigen_assert(matrix.rows() == matrix.cols() && "PartialPivLU is only for square (and moreover invertible) matrices"); -- cgit v1.2.3