diff options
-rw-r--r-- | Eigen/src/LU/PartialLU.h | 10 | ||||
-rw-r--r-- | test/redux.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Eigen/src/LU/PartialLU.h b/Eigen/src/LU/PartialLU.h index 20ebd9d6a..e467c62f0 100644 --- a/Eigen/src/LU/PartialLU.h +++ b/Eigen/src/LU/PartialLU.h @@ -216,10 +216,10 @@ struct ei_partial_lu_impl typedef Map<Matrix<Scalar, Dynamic, Dynamic, StorageOrder> > MapLU; typedef Block<MapLU, Dynamic, Dynamic> MatrixType; typedef Block<MatrixType,Dynamic,Dynamic> BlockType; - + /** \internal performs the LU decomposition in-place of the matrix \a lu * using an unblocked algorithm. - * + * * In addition, this function returns the row transpositions in the * vector \a row_transpositions which must have a size equal to the number * of columns of the matrix \a lu, and an integer \a nb_transpositions @@ -233,7 +233,7 @@ struct ei_partial_lu_impl for(int k = 0; k < size; ++k) { int row_of_biggest_in_col; - lu.block(k,k,rows-k,1).cwise().abs().maxCoeff(&row_of_biggest_in_col); + lu.col(k).end(rows-k).cwise().abs().maxCoeff(&row_of_biggest_in_col); row_of_biggest_in_col += k; row_transpositions[k] = row_of_biggest_in_col; @@ -296,7 +296,7 @@ struct ei_partial_lu_impl int bs = std::min(size-k,blockSize); // actual size of the block int trows = rows - k - bs; // trailing rows int tsize = size - k - bs; // trailing size - + // partition the matrix: // A00 | A01 | A02 // lu = A10 | A11 | A12 @@ -344,7 +344,7 @@ void ei_partial_lu_inplace(MatrixType& lu, IntVector& row_transpositions, int& n { ei_assert(lu.cols() == row_transpositions.size()); ei_assert((&row_transpositions.coeffRef(1)-&row_transpositions.coeffRef(0)) == 1); - + ei_partial_lu_impl <typename MatrixType::Scalar, MatrixType::Flags&RowMajorBit?RowMajor:ColMajor> ::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.stride(), &row_transpositions.coeffRef(0), nb_transpositions); diff --git a/test/redux.cpp b/test/redux.cpp index b929fdc0e..951b34bca 100644 --- a/test/redux.cpp +++ b/test/redux.cpp @@ -120,7 +120,7 @@ void test_redux() CALL_SUBTEST( matrixRedux(MatrixXi(8, 12)) ); } for(int i = 0; i < g_repeat; i++) { - CALL_SUBTEST( vectorRedux(VectorX4f()) ); + CALL_SUBTEST( vectorRedux(Vector4f()) ); CALL_SUBTEST( vectorRedux(VectorXd(10)) ); CALL_SUBTEST( vectorRedux(VectorXf(33)) ); } |