bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Bug in lm(s)der_set - cannot reuse fitter


From: Brian Gough
Subject: Re: [Bug-gsl] Bug in lm(s)der_set - cannot reuse fitter
Date: Sun, 29 Jul 2007 19:46:32 +0200
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)

At Thu, 12 Jul 2007 17:42:00 +0200,
Christian Holm Christensen wrote:
> There's a bug in the lm(s)der_set functions (called by
> gsl_multifit_fdfsolver_set), that makes it impossible to reuse a
> fitter. 

I think the following patch to multifit/lmset.c should fix the
problems.  Can you try it and let me know. Thanks.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

--- lmset.c     24 Jun 2005 12:52:56 +0200      1.8
+++ lmset.c     29 Jul 2007 19:43:16 +0200      
@@ -40,5 +40,18 @@
   gsl_matrix_memcpy (r, J);
   gsl_linalg_QRPT_decomp (r, tau, perm, &signum, work1);
 
+  gsl_vector_set_zero (state->rptdx);
+  gsl_vector_set_zero (state->w);
+
+  /* Zero the trial vector, as in the alloc function */
+
+  gsl_vector_set_zero (state->f_trial);
+
+#ifdef DEBUG
+  printf("r = "); gsl_matrix_fprintf(stdout, r, "%g");
+  printf("perm = "); gsl_permutation_fprintf(stdout, perm, "%d");
+  printf("tau = "); gsl_vector_fprintf(stdout, tau, "%g");
+#endif
+
   return GSL_SUCCESS;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]