[Gsll-devel] Functions passed with function designators only
Liam Healy
lhealy at common-lisp.net
Wed Apr 1 03:12:19 UTC 2009
I have made a change to how functions ("callbacks") are passed to GSL.
Previously, it was necessary to write the function(s) as separate defun(s)
and then define make-callback on them. Now, you simply pass a function
designator (function object or symbol representing a function object).
For example, to integrate sine from 0 to pi,
(integration-qng 'sin 0.0d0 pi)
or to integrate the sine of the square root of x,
(integration-qng (lambda (x) (sin (sqrt x))) 0.0d0 pi)
This goes for all functions and mobjects that pass functions to GSL.
Many functions that took lists of functions (such as function, df, fdf)
now take the functions separately. The argument 'scalarsp is present
in many mobject creators; if set to T, your function(s) will be passed
array arguments as separate elements, and should return multiple
values of elements in proper order for any returned array(s).
If you are using any of these definitions, you will need to remove
your make-callback forms and update the calling after you pull
the new master branch.
Liam
More information about the gsll-devel
mailing list