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; } _______________________________________________ Bug-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gsl
