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

@@ -120,8 +120,7 @@ enum EulerAxis {
template <int _AlphaAxis, int _BetaAxis, int _GammaAxis>
class EulerSystem {
public:
// It's defined this way and not as enum, because I think
// that enum is not guerantee to support negative numbers
// Defined as static constexpr rather than enum to ensure support for negative values.
/** The first rotation axis */
static constexpr int AlphaAxis = _AlphaAxis;

View File

@@ -16,8 +16,8 @@ namespace Eigen {
namespace internal {
// FFTW uses non-const arguments
// so we must use ugly const_cast calls for all the args it uses
// FFTW uses non-const arguments,
// so const_cast is needed for all the args it uses.
//
// This should be safe as long as
// 1. we use FFTW_ESTIMATE for all our planning

View File

@@ -21,8 +21,7 @@ namespace internal {
// post: sqrtT.block(i,i,2,2) is square root of T.block(i,i,2,2)
template <typename MatrixType, typename ResultType>
void matrix_sqrt_quasi_triangular_2x2_diagonal_block(const MatrixType& T, Index i, ResultType& sqrtT) {
// TODO: This case (2-by-2 blocks with complex conjugate eigenvalues) is probably hidden somewhere
// in EigenSolver. If we expose it, we could call it directly from here.
// TODO: this 2x2 complex-conjugate eigenvalue case could reuse logic from EigenSolver if exposed.
typedef typename traits<MatrixType>::Scalar Scalar;
Matrix<Scalar, 2, 2> block = T.template block<2, 2>(i, i);
EigenSolver<Matrix<Scalar, 2, 2> > es(block);

View File

@@ -67,8 +67,7 @@ void lmpar(Matrix<Scalar, Dynamic, Dynamic> &r, const VectorXi &ipvt, const Matr
l = ipvt[j];
wa1[j] = diag[l] * (wa2[l] / dxnorm);
}
// it's actually a triangularView.solveInplace(), though in a weird
// way:
// Triangular solve (forward substitution):
for (j = 0; j < n; ++j) {
Scalar sum = 0.;
for (i = 0; i < j; ++i) sum += r(i, j) * wa1[i];