mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user