|[eigen] MAXITER in the Eigenvalue module|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
I am wondering what should happen if the iterative process does not
converge. The Schur and tridiagonalization decomposition, and indirectly
all eigensolvers, are based on an iteration. At the moment, the code
prints "MAXITER" to cerr and leaves the object in an inconsistent state
when the maximum number of iterations (hardcoded to be 30) is reached.
I think that the SVD procedure has similar issues.
As I understand it, it is extremely unlikely that you need more than 30
iterations. I haven't yet seen an example in you reach this limit, but on
the other hand there does not seem to be a proof that the algorithm
terminates. So I guess we should design the API while keeping in mind that
the algorithm may not succeed.
One possibility is to add a member function isInitialized() which returns
true if the computation was successful. That would not break any existing
programs. Ideally, compute() would return a bool indicating success, but
at the moment compute() in EigenSolver and SelfAdjointEigenSolver returns
*this. That is actually inconsistent, because compute() in
ComplexEigenSolver and the various matrix decomposition classes return
void. What shall we do about this?