qtiplot-0.9.8.9-gsl-2.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. * Info: Using [gentoo] (https://bugs.gentoo.org/xmlrpc.cgi)
  2. * Info: Getting attachment 425760
  3. * Info: Viewing attachment: "fix_fit_gsl_fdfsolver.patch"
  4. diff --git a/qtiplot/src/analysis/Fit.cpp b/qtiplot/src/analysis/Fit.cpp
  5. index 22cb5be..555f21d 100755
  6. --- a/qtiplot/src/analysis/Fit.cpp
  7. +++ b/qtiplot/src/analysis/Fit.cpp
  8. @@ -106,6 +106,7 @@ void Fit::init()
  9. gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iterations, int &status)
  10. {
  11. const gsl_multifit_fdfsolver_type *T;
  12. + gsl_matrix *J;
  13. if (d_solver)
  14. T = gsl_multifit_fdfsolver_lmder;
  15. else
  16. @@ -128,7 +129,8 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iteration
  17. }
  18. if (status){
  19. - gsl_multifit_covar (s->J, 0.0, covar);
  20. + gsl_multifit_fdfsolver_jac (s, J);
  21. + gsl_multifit_covar (J, 0.0, covar);
  22. iterations = 0;
  23. return s;
  24. }
  25. @@ -155,7 +157,8 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iteration
  26. status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance);
  27. } while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations);
  28. - gsl_multifit_covar (s->J, 0.0, covar);
  29. + gsl_multifit_fdfsolver_jac (s, J);
  30. + gsl_multifit_covar (J, 0.0, covar);
  31. iterations = iter;
  32. return s;