## [Vxl-users] vnl_lsqr set_max_iterations() once again

 [Vxl-users] vnl_lsqr set_max_iterations() once again From: Dominique - 2002-05-24 13:49:36 ```Hi, I think once proposed default value of 4*N (N the A matrix's dimension in A*x=b) for max iterations in vnl_lsqr can be far too small in many cases. The number of needed iterations increases not only with the number of equations to be solved (N) but also with the complexity of the system (and is more or less independent of the order of the used numbers). A good measure to consider could be "density" of matrix A and Q (density defined as (number of non-zero elements)/N) ). I found number of iterations much more dependent on this than just on N. I think this should make it for linear Ax=b. I would add this info to the vnl_lsqr.hxx file so new vnl_lsqr users dont have to repeat my trials and errors. -::- Another thing is: how should I understand the following: vnl_lsqr.cxx : x = 0 is the exact solution. No iterations were performed. vnl_lsqr.cxx : The iteration limit ITNLIM was reached. bye Domi ```

 [Vxl-users] vnl_lsqr set_max_iterations() once again From: Dominique - 2002-05-24 13:49:36 ```Hi, I think once proposed default value of 4*N (N the A matrix's dimension in A*x=b) for max iterations in vnl_lsqr can be far too small in many cases. The number of needed iterations increases not only with the number of equations to be solved (N) but also with the complexity of the system (and is more or less independent of the order of the used numbers). A good measure to consider could be "density" of matrix A and Q (density defined as (number of non-zero elements)/N) ). I found number of iterations much more dependent on this than just on N. I think this should make it for linear Ax=b. I would add this info to the vnl_lsqr.hxx file so new vnl_lsqr users dont have to repeat my trials and errors. -::- Another thing is: how should I understand the following: vnl_lsqr.cxx : x = 0 is the exact solution. No iterations were performed. vnl_lsqr.cxx : The iteration limit ITNLIM was reached. bye Domi ```
 Re: [Vxl-users] vnl_lsqr set_max_iterations() once again From: Peter Vanroose - 2002-05-24 15:57:10 ```> Another thing is: how should I understand the following: > > vnl_lsqr.cxx : x = 0 is the exact solution. No iterations were performed. > vnl_lsqr.cxx : The iteration limit ITNLIM was reached. For a complete view on the documentation, also have a look in v3p/netlib/lsqr.c (and lsqr.f) which is the actual implementation. Peter. ```