Added unit tests for eigen
All checks were successful
Merge-Checker / build_and_test (pull_request) Successful in 23s

This commit is contained in:
2025-05-30 15:26:19 -04:00
parent d07ac43f7b
commit 6fdab5be30
3 changed files with 97 additions and 17 deletions

View File

@@ -221,21 +221,22 @@ public:
* @param Q a buffer that will contain Q after the function completes
* @param R a buffer that will contain R after the function completes
*/
void QRDecomposition(Matrix<rows, rows> &Q, Matrix<rows, rows> &R) const;
void QRDecomposition(Matrix<rows, columns> &Q,
Matrix<columns, columns> &R) const;
/**
* @brief Uses QR decomposition to efficiently calculate the eigenvectors and
* values of this matrix
* @brief Uses QR decomposition to efficiently calculate the eigenvectors
* and values of this matrix
* @param eigenVectors a buffer that will contain the eigenvectors fo this
* matrix
* @param eigenValues a buffer that will contain the eigenValues fo this
* matrix
* @param maxIterations the number of iterations to perform before giving up
* on reaching the given tolerance
* @param maxIterations the number of iterations to perform before giving
* up on reaching the given tolerance
* @param tolerance the level of accuracy to obtain before stopping.
*/
void EigenQR(Matrix<rows, rows> &eigenVectors, Matrix<rows, 1> &eigenValues,
uint16_t maxIterations = 1000, float tolerance = 1e-6f) const;
uint32_t maxIterations = 1000, float tolerance = 1e-6f) const;
protected:
std::array<float, rows * columns> matrix;