diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-11-02 14:18:20 +0000 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-11-02 14:18:20 +0000 |
commit | a594ac3966541f46e88b785c56d82bfaf71fd302 (patch) | |
tree | 8e226b5ced4a50200656a83324ec935188d98036 /doc/examples | |
parent | 57207239f330c2716442557a341f3a34e696b9ad (diff) |
Allow for more iterations in SelfAdjointEigenSolver (bug #354).
Add an assert to guard against using eigenvalues that have not converged.
Add call to info() in tutorial example to cover non-convergence.
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp b/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp index e98444347..8d1d1ed65 100644 --- a/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp +++ b/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp @@ -10,8 +10,9 @@ int main() A << 1, 2, 2, 3; cout << "Here is the matrix A:\n" << A << endl; SelfAdjointEigenSolver<Matrix2f> eigensolver(A); + if (eigensolver.info() != Success) abort(); cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << endl; - cout << "Here's a matrix whose columns are eigenvectors of A " + cout << "Here's a matrix whose columns are eigenvectors of A \n" << "corresponding to these eigenvalues:\n" << eigensolver.eigenvectors() << endl; } |