[Gsll-devel] Patch that exports symbols required to use non-linear fitting outside the gsl package

Liam Healy lhealy at common-lisp.net
Fri Apr 30 02:37:51 UTC 2010


No problem.  Thanks for the update.

Liam

On Wed, Apr 28, 2010 at 6:06 PM, Russell Kliese <russell at kliese.id.au> wrote:
> Hi Liam,
>
> Just a quick note to let you know that I tested the changes and all
> looks good. Your additional changes have made the interface better.
> Thank you!
>
> Cheers,
>
> Russell
>
> On Thu, 2010-04-29 at 08:02 +1000, Russell Kliese wrote:
>> OK, I've applied your patch and made some further changes.  I have
>> generally followed a policy of making objects that are to be returned
>> by the function be optional arguments, with the correctly sized object
>> being made by default, thereby sparing the programmer from having to
>> think about it.  Toward this end, the covariance argument to
>> ls-covariance is now an optional argument.  In order to extract the
>> dimension, I needed to pass in the solver object as the first argument
>> to ls-covariance, so it calls #'jacobian instead of the programmer
>> having to.  So I've unexported it, as that's now all taken care of.  I
>> converted the example so that it no longer creates the covariance
>> matrix.  The test passes.   There is probably more improvements that
>> can be made along these lines, but I'll let this go for now.
>>
>> [Note: for entirely independent reasons, you'll have to do fresh pull
>> of GSD when you pull the new GSLL, if you are a SBCL user.]
>>
>> Liam
>>
>> On Fri, Apr 23, 2010 at 10:35 PM, Russell Kliese <russell at kliese.id.au> wrote:
>> > Yes, I was thinking the same thing. I created a new patch and tested the
>> > example.
>> >
>> > There is also the issue of the ls-covariance function requiring a raw
>> > pointer to the Jacobin matrix. I just exported the jacobian function in
>> > the attached patch.
>> >
>> > Cheers,
>> >
>> > Russell
>> >
>> > On Thu, 2010-04-22 at 22:45 -0400, Liam Healy wrote:
>> >> Hmm, so it does.  I'm wondering if fit-test-delta is always
>> >> called with last-step and current-position derived from the
>> >> same fit object.  In which case, would it make sense
>> >> to just have one argument there, the fit object?
>> >> E.g. (fit-test-delta fit 1.0d-4 1.0d-4)
>> >> What do you think?
>> >>
>> >> Liam
>> >>
>> >> On Wed, Apr 21, 2010 at 10:15 PM, Russell Kliese <russell at kliese.id.au> wrote:
>> >> > Hi Liam,
>> >> >
>> >> > The example included at the bottom of
>> >> > gsll/solve-minimize-fit/nonlinear-least-squares.lisp, line 373
>> >> > (fit-test-delta (last-step fit) (mpointer (solution fit)) 1.0d-4
>> >> > 1.0d-4)) uses (mpointer (solution fit)). Because mpointer isn't
>> >> > exported, I thought I would create a specific function like last-step
>> >> > and jacobian that return raw pointers. I don't really have a good
>> >> > working knowledge of the internals of gsll so this may be a naive fix.
>> >> >
>> >> > Cheers,
>> >> >
>> >> > Russell
>> >> >
>> >> > 2010/4/22 Liam Healy <lhealy at common-lisp.net>:
>> >> >> Russell,
>> >> >>
>> >> >> Can you give an example showing why this function is needed?
>> >> >> If I understand correctly, #'solution gives an marray which
>> >> >> can be used like any other marray.  As a general practice
>> >> >> I don't define functions returning raw pointers unless the exclusive
>> >> >> use of the returned value from the original function
>> >> >> use is to pass to a GSL function that must take a raw
>> >> >> pointer, and that is very rare.
>> >> >>
>> >> >> Liam
>> >
>>
>
>




More information about the gsll-devel mailing list