Throwing in the towel on eigenvectors for now
All checks were successful
Merge-Checker / build_and_test (pull_request) Successful in 26s

This commit is contained in:
2025-06-06 16:33:20 -04:00
parent d84664b567
commit c099dfe760
2 changed files with 40 additions and 62 deletions

View File

@@ -572,12 +572,13 @@ void Matrix<rows, columns>::EigenQR(Matrix<rows, rows> &eigenVectors,
Matrix<rows, rows> Ak = *this; // Copy original matrix
Matrix<rows, rows> QQ{Matrix<rows, rows>::Identity()};
Matrix<rows, rows> shift{0};
for (uint32_t iter = 0; iter < maxIterations; ++iter) {
Matrix<rows, rows> Q, R, shift;
Matrix<rows, rows> Q, R;
// QR shift lets us "attack" the first diagonal to speed up the algorithm
shift = Matrix<rows, rows>::Identity() * Ak[rows - 1][rows - 1];
// // QR shift lets us "attack" the first diagonal to speed up the algorithm
// shift = Matrix<rows, rows>::Identity() * Ak[rows - 1][rows - 1];
(Ak - shift).QRDecomposition(Q, R);
Ak = R * Q + shift;
QQ = QQ * Q;