diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-04 21:24:43 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-04 21:24:43 -0500 |
commit | 39ac57fa6ddf9a74d9a6cc213293914d2e05ec31 (patch) | |
tree | 6c5c83c68ca023799bc09ebcbe150f894cb33b3b /Eigen/src/LU | |
parent | 78ba523d3038b854c5beca7a94cbe9b7e955a9f3 (diff) |
Big renaming:
start ---> head
end ---> tail
Much frustration with sed syntax. Need to learn perl some day.
Diffstat (limited to 'Eigen/src/LU')
-rw-r--r-- | Eigen/src/LU/FullPivLU.h | 10 | ||||
-rw-r--r-- | Eigen/src/LU/PartialPivLU.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 1358c9490..4dabe54d8 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -451,9 +451,9 @@ FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix) // bottom-right corner by Gaussian elimination. if(k<rows-1) - m_lu.col(k).end(rows-k-1) /= m_lu.coeff(k,k); + m_lu.col(k).tail(rows-k-1) /= m_lu.coeff(k,k); if(k<size-1) - m_lu.block(k+1,k+1,rows-k-1,cols-k-1).noalias() -= m_lu.col(k).end(rows-k-1) * m_lu.row(k).end(cols-k-1); + m_lu.block(k+1,k+1,rows-k-1,cols-k-1).noalias() -= m_lu.col(k).tail(rows-k-1) * m_lu.row(k).tail(cols-k-1); } // the main loop is over, we still have to accumulate the transpositions to find the @@ -537,8 +537,8 @@ struct ei_kernel_retval<FullPivLU<_MatrixType> > m(dec().matrixLU().block(0, 0, rank(), cols)); for(int i = 0; i < rank(); ++i) { - if(i) m.row(i).start(i).setZero(); - m.row(i).end(cols-i) = dec().matrixLU().row(pivots.coeff(i)).end(cols-i); + if(i) m.row(i).head(i).setZero(); + m.row(i).tail(cols-i) = dec().matrixLU().row(pivots.coeff(i)).tail(cols-i); } m.block(0, 0, rank(), rank()); m.block(0, 0, rank(), rank()).template triangularView<StrictlyLowerTriangular>().setZero(); @@ -558,7 +558,7 @@ struct ei_kernel_retval<FullPivLU<_MatrixType> > m.col(i).swap(m.col(pivots.coeff(i))); // see the negative sign in the next line, that's what we were talking about above. - for(int i = 0; i < rank(); ++i) dst.row(dec().permutationQ().indices().coeff(i)) = -m.row(i).end(dimker); + for(int i = 0; i < rank(); ++i) dst.row(dec().permutationQ().indices().coeff(i)) = -m.row(i).tail(dimker); for(int i = rank(); i < cols; ++i) dst.row(dec().permutationQ().indices().coeff(i)).setZero(); for(int k = 0; k < dimker; ++k) dst.coeffRef(dec().permutationQ().indices().coeff(rank()+k), k) = Scalar(1); } diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 577daa345..e65b057ae 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -229,7 +229,7 @@ struct ei_partial_lu_impl { int row_of_biggest_in_col; RealScalar biggest_in_corner - = lu.col(k).end(rows-k).cwise().abs().maxCoeff(&row_of_biggest_in_col); + = lu.col(k).tail(rows-k).cwise().abs().maxCoeff(&row_of_biggest_in_col); row_of_biggest_in_col += k; if(biggest_in_corner == 0) // the pivot is exactly zero: the matrix is singular @@ -256,8 +256,8 @@ struct ei_partial_lu_impl { int rrows = rows-k-1; int rsize = size-k-1; - lu.col(k).end(rrows) /= lu.coeff(k,k); - lu.corner(BottomRight,rrows,rsize).noalias() -= lu.col(k).end(rrows) * lu.row(k).end(rsize); + lu.col(k).tail(rrows) /= lu.coeff(k,k); + lu.corner(BottomRight,rrows,rsize).noalias() -= lu.col(k).tail(rrows) * lu.row(k).tail(rsize); } } return true; |