[qtiplot] 05/06: Respect all versions of GSL.

Anton Gladky gladk at moszumanska.debian.org
Sun Dec 6 06:31:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository qtiplot.

commit 4fb51fdc1dec88235cc5d8432129180e53f2a992
Author: Anton Gladky <gladk at debian.org>
Date:   Sat Dec 5 23:44:39 2015 +0100

    Respect all versions of GSL.
---
 debian/patches/10_adopt_to_gsl2.diff | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/debian/patches/10_adopt_to_gsl2.diff b/debian/patches/10_adopt_to_gsl2.diff
index bb6af7e..cffb939 100644
--- a/debian/patches/10_adopt_to_gsl2.diff
+++ b/debian/patches/10_adopt_to_gsl2.diff
@@ -1,42 +1,50 @@
 Description: adoptation to gsl2.
-Author: Damir Islamov <damir at secretlaboratory.ru>
+Author: Damir Islamov <damir at secretlaboratory.ru>, Anton Gladky <gladk at debian.org>
 Last-Update: 2015-12-04
 
 Index: qtiplot/qtiplot/src/analysis/Fit.cpp
 ===================================================================
 --- qtiplot.orig/qtiplot/src/analysis/Fit.cpp
 +++ qtiplot/qtiplot/src/analysis/Fit.cpp
-@@ -126,10 +126,14 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+@@ -126,10 +126,19 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
  			break;
  		}
  	}
 -
  	if (status){
--	    gsl_multifit_covar (s->J, 0.0, covar);
 +	    // allocate memory and calculate covariance matrix based on residuals
++#if GSL_MAJOR_VERSION == 2
 +	    gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
 +	    gsl_multifit_fdfsolver_jac(s, J);
 +	    gsl_multifit_covar (J, 0.0, covar);
- 	    iterations = 0;
++	    iterations = 0;
 +	    // free previousely allocated memory
 +	    gsl_matrix_free (J);
++#else
+ 	    gsl_multifit_covar (s->J, 0.0, covar);
+ 	    iterations = 0;
++#endif
  	    return s;
  	}
  
-@@ -154,10 +158,13 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+@@ -154,10 +163,18 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
  
  		status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance);
  	} while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations);
 -
--	gsl_multifit_covar (s->J, 0.0, covar);
--
++#if GSL_MAJOR_VERSION == 2
 +	// allocate memory and calculate covariance matrix based on residuals
 +	gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
 +	gsl_multifit_fdfsolver_jac(s, J);
 +	gsl_multifit_covar (J, 0.0, covar);
- 	iterations = iter;
++	iterations = iter;
 +	// free previousely allocated memory
 +	gsl_matrix_free (J);
++#else
+ 	gsl_multifit_covar (s->J, 0.0, covar);
+-
+ 	iterations = iter;
++#endif
  	return s;
  }
  

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/qtiplot.git



More information about the debian-science-commits mailing list