Hi, For some reason it seems like a message I posted a few days ago did not get emailed to list members, but it did get archived (http://common-lisp.net/pipermail/gsll-devel/2010q2/000458.html). Here it is again:
I think some additional exports are required in order to make use of the non-linear least-squares fitting outside of the gsl package. Attached is a patch that achieves this. Cheers, Russell
From e5f4e270d0d14fb8a1f653b25ed9ff11326d1fe1 Mon Sep 17 00:00:00 2001 From: Russell Kliese <[email protected]> Date: Mon, 12 Apr 2010 17:31:41 +1000 Subject: [PATCH] Export additional symbols required to use nonlinear least squares fitting outside of the gsl package --- solve-minimize-fit/nonlinear-least-squares.lisp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/solve-minimize-fit/nonlinear-least-squares.lisp b/solve-minimize-fit/nonlinear-least-squares.lisp index a7279fb..e9955c9 100644 --- a/solve-minimize-fit/nonlinear-least-squares.lisp +++ b/solve-minimize-fit/nonlinear-least-squares.lisp @@ -141,10 +141,16 @@ ;; Raw pointer, because we presume we're passing it on to another GSL function. (cffi:foreign-slot-value (mpointer solver) 'gsl-fdffit-solver 'dx)) +(export 'jacobian) (defun jacobian (solver) ;; Raw pointer, because we presume we're passing it on to another GSL function. (cffi:foreign-slot-value (mpointer solver) 'gsl-fdffit-solver 'jacobian)) +(export 'current-position) +(defun current-position (solver) + ;; Raw pointer, because we presume we're passing it on to another GSL function. + (mpointer (solution solver))) + ;;;;**************************************************************************** ;;;; Search stopping ;;;;**************************************************************************** @@ -370,7 +376,7 @@ (loop for iter from 0 below 25 until (and (plusp iter) - (fit-test-delta (last-step fit) (mpointer (solution fit)) 1.0d-4 1.0d-4)) + (fit-test-delta (last-step fit) (current-position fit) 1.0d-4 1.0d-4)) do (iterate fit) (ls-covariance (jacobian fit) 0.0d0 covariance) -- 1.5.2.1
_______________________________________________ Gsll-devel mailing list [email protected] http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
