Next: , Previous: Nonlinear Least-Squares Testing for Convergence, Up: Nonlinear Least-Squares Fitting   [Index]


39.9 High Level Driver

These routines provide a high level wrapper that combines the iteration and convergence testing for easy use.

Function: int gsl_multifit_nlinear_driver (const size_t maxiter, const double xtol, const double gtol, const double ftol, void (* callback)(const size_t iter, void * params, const gsl_multifit_linear_workspace * w), void * callback_params, int * info, gsl_multifit_nlinear_workspace * w)
Function: int gsl_multilarge_nlinear_driver (const size_t maxiter, const double xtol, const double gtol, const double ftol, void (* callback)(const size_t iter, void * params, const gsl_multilarge_linear_workspace * w), void * callback_params, int * info, gsl_multilarge_nlinear_workspace * w)

These functions iterate the nonlinear least squares solver w for a maximum of maxiter iterations. After each iteration, the system is tested for convergence with the error tolerances xtol, gtol and ftol. Additionally, the user may supply a callback function callback which is called after each iteration, so that the user may save or print relevant quantities for each iteration. The parameter callback_params is passed to the callback function. The parameters callback and callback_params may be set to NULL to disable this feature. Upon successful convergence, the function returns GSL_SUCCESS and sets info to the reason for convergence (see gsl_multifit_nlinear_test). If the function has not converged after maxiter iterations, GSL_EMAXITER is returned. In rare cases, during an iteration the algorithm may be unable to find a new acceptable step \delta to take. In this case, GSL_ENOPROG is returned indicating no further progress can be made. If your problem is having difficulty converging, see Nonlinear Least-Squares Troubleshooting for further guidance.