-
- Downloads
Maref and (setf maref) for GSL vector pointers; optional arguments in :method
The generic function #'maref will work on foreign pointers and assume them to be pointing to either a gsl-vector-c or a gsl-matrix-c, depending on how many indices are given. This then functions like the old #'vref and #'mref. It is used in the new function #'make-vector-from-gsl which creates a CL vector (using make-array*) which is needed by several functions in solve-minimize-fit. It is also useful in the callbacks a user would define for solve-minimize-fit functions. Similar functionality added to (setf aref) which was turned into a generic function. As part of the changes needed to define these methods, the defmfun family was modified to accept optional arguments in #'expand-defmfun-method, which is invoked when :definition :method is given. Functions with optional arguments fall into two categories as far as defmfun is concerned: those that correspond to multiple GSL functions, and those that don't. This should work in both cases.
Please register or sign in to comment