Clean up informal language, vague TODOs, and dead code in comments

libeigen/eigen!2191

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-22 18:32:10 -08:00
parent 7d727d26bc
commit d5e67adbe7
63 changed files with 136 additions and 161 deletions

View File

@@ -51,7 +51,7 @@ class SparseLUTransposeView : public SparseSolverBase<SparseLUTransposeView<Conj
eigen_assert(m_sparseLU->info() == Success && "The matrix should be factorized first");
EIGEN_STATIC_ASSERT((Dest::Flags & RowMajorBit) == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
// this ugly const_cast_derived() helps to detect aliasing when applying the permutations
// const_cast_derived() is needed to enable aliasing detection when applying the permutations.
for (Index j = 0; j < B.cols(); ++j) {
X.col(j) = m_sparseLU->colsPermutation() * B.const_cast_derived().col(j);
}
@@ -344,7 +344,7 @@ class SparseLU : public SparseSolverBase<SparseLU<MatrixType_, OrderingType_>>,
// on return, X is overwritten by the computed solution
X.resize(B.rows(), B.cols());
// this ugly const_cast_derived() helps to detect aliasing when applying the permutations
// const_cast_derived() is needed to enable aliasing detection when applying the permutations.
for (Index j = 0; j < B.cols(); ++j) X.col(j) = rowsPermutation() * B.const_cast_derived().col(j);
// Forward substitution with L
@@ -603,7 +603,7 @@ void SparseLU<MatrixType, OrderingType>::analyzePattern(const MatrixType& mat) {
* > A->ncol: number of bytes allocated when memory allocation failure occurred, plus A->ncol.
* If lwork = -1, it is the estimated amount of space needed, plus A->ncol.
*
* It seems that A was the name of the matrix in the past.
* Note: 'A' in the above description refers to the factored matrix (historical naming from SuperLU).
*
* \sa analyzePattern(), compute(), SparseLU(), info(), lastErrorMessage()
*/
@@ -616,7 +616,6 @@ void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix) {
m_isInitialized = true;
// Apply the column permutation computed in analyzepattern()
// m_mat = matrix * m_perm_c.inverse();
m_mat = matrix;
if (m_perm_c.size()) {
m_mat.uncompress(); // NOTE: The effect of this command is only to create the InnerNonzeros pointers.
@@ -779,7 +778,7 @@ void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix) {
}
// Update the determinant of the row permutation matrix
// FIXME: the following test is not correct, we should probably take iperm_c into account and pivrow is not
// FIXME: the following test is not correct; it should account for iperm_c, and pivrow is not
// directly the row pivot.
if (pivrow != jj) m_detPermR = -m_detPermR;