diff --git a/README.md b/README.md index b5a85d8..430438f 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,14 @@ Jacobi eigen_calc(n); // Note: // If the matrix you plan to diagonalize (M) is read-only, use this instead: -// Jacobi eigen_calc(n); -// If you prefer using vectors over C-style pointers, this works also: -// Jacobi&, vector>&> eigen_calc(n); +// Jacobi eigen_calc(n); +// If you prefer using C++ vectors over C-style pointers, this works also: +// Jacobi&, vector>&, +// const vector>&> eigen_calc(n); // Now, calculate the eigenvalues and eigenvectors of M -eigen_calc.Diagonalize(M, evals, evects); +eigen_calc.Diagonalize(M, evals, evects); //(succeeded if return value is != 0) ``` ## Benchmarks diff --git a/tests/test_jacobi.cpp b/tests/test_jacobi.cpp index 3788fd3..b9a8f88 100644 --- a/tests/test_jacobi.cpp +++ b/tests/test_jacobi.cpp @@ -539,6 +539,16 @@ void TestJacobi(int n, //::SORT_INCREASING_ABS_EVALS); + // Also make sure the code considers a scenario where convergence fails: + ecalc.Diagonalize(M, + evals, + evecs, + Jacobi::SORT_INCREASING_ABS_EVALS, + true, + 0); //<-- set the maximum allowed iterations to 0 #endif for (int i = 1; i < n; i++)