Remainder of GSL 2.0 API changes

This completes the first pass of changes so that GSLL will load with
GSL 2.0 and above. It is not tested. It will still give an error when
trying to load with GSL 2.
parent 8ef71890
;; Nonlinear least squares fitting.
;; Liam Healy, 2008-02-09 12:59:16EST nonlinear-least-squares.lisp
;; Time-stamp: <2016-06-14 23:34:23EDT nonlinear-least-squares.lisp>
;; Time-stamp: <2016-08-07 21:32:38EDT nonlinear-least-squares.lisp>
;;
;; Copyright 2008, 2009, 2011, 2012, 2016 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -141,10 +141,20 @@
;; Raw pointer, because we presume we're passing it on to another GSL function.
(cffi:foreign-slot-value (mpointer solver) '(:struct gsl-fdffit-solver) 'dx))
#-gsl2
(defun jacobian (solver)
;; Raw pointer, because we presume we're passing it on to another GSL function.
(cffi:foreign-slot-value (mpointer solver) '(:struct gsl-fdffit-solver) 'jacobian))
;;; This needs work to make matrix automatically allocated.
#+gsl2
(defmfun jacobian (solver matrix)
"gsl_multifit_fdfsolver_jac"
(((mpointer solver) :pointer) ((mpointer matrix) :pointer))
:return (matrix)
:documentation
"The Jacobian matrix for the current iteration of the solver.")
;;;;****************************************************************************
;;;; Search stopping
;;;;****************************************************************************
......
;; Define the structures for solvers
;; Liam Healy 2009-06-06 16:46:38EDT solver-struct.lisp
;; Time-stamp: <2010-05-23 11:37:49EDT solver-struct.lisp>
;; Time-stamp: <2016-08-07 19:37:54EDT solver-struct.lisp>
;;
;; Copyright 2009, 2010 Liam M. Healy
;; Copyright 2009, 2010, 2016 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -31,11 +31,11 @@
(include "gsl/gsl_multifit_nlin.h")
;; The definition of a solver instance and state
;; for nonlinear least squares fitting in GSL."
;; for nonlinear least squares fitting in GSL.
(cstruct gsl-fdffit-solver "gsl_multifit_fdfsolver"
(f "f" :type :pointer)
(jacobian "J" :type :pointer)
#-gsl2 (jacobian "J" :type :pointer)
(dx "dx" :type :pointer))
(include "gsl/gsl_multiroots.h")
......
;; Legendre functions
;; Liam Healy, Sat Apr 29 2006 - 19:16
;; Time-stamp: <2011-10-29 23:42:17EDT legendre.lisp>
;; Time-stamp: <2016-08-07 19:06:40EDT legendre.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2011, 2016 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -108,10 +108,11 @@
(defmfun legendre-Plm (l m x)
"gsl_sf_legendre_Plm_e"
((l :int) (m :int) (x :double) (ret (:pointer (:struct sf-result))))
:documentation ; FDL
:documentation ; GSL texi
"The associated Legendre polynomial
P_l^m(x) for m >= 0, l >= m, |x| <= 1.")
#-gsl2
(defmfun legendre-Plm-array
(m x &optional (size-or-array *default-sf-array-size*)
&aux (array (vdf size-or-array)))
......@@ -119,11 +120,12 @@
(((+ (dim0 array) m -1) :int) (m :int) (x :double)
((grid:foreign-pointer array) :pointer))
:outputs (array)
:documentation ; FDL
:documentation ; GSL texi
"An array of Legendre polynomials
P_l^m(x), for m >= 0,
l = |m|, ..., |m|+length(array)-1} and |x| <= 1.")
#-gsl2
(defmfun legendre-Plm-deriv-array
(m x &optional (values-size-or-array *default-sf-array-size*)
(derivatives-size-or-array *default-sf-array-size*)
......@@ -133,7 +135,7 @@
(((+ (dim0 values) m -1) :int) (m :int) (x :double)
((grid:foreign-pointer values) :pointer) ((grid:foreign-pointer derivatives) :pointer))
:outputs (values derivatives)
:documentation ; FDL
:documentation ; GSL texi
"An array of Legendre polynomials
values and derivatives dP_l^m(x)/dx for m >= 0,
l = |m|, ..., length(values) and |x| <= 1.")
......@@ -141,13 +143,14 @@
(defmfun legendre-sphPlm (l m x)
"gsl_sf_legendre_sphPlm_e"
((l :int) (m :int) (x :double) (ret (:pointer (:struct sf-result))))
:documentation ; FDL
:documentation ; GSL texi
"The normalized associated Legendre polynomial
\sqrt{(2l+1)/(4\pi) \sqrt{(l-m)!/(l+m)!} P_l^m(x) suitable
for use in spherical harmonics. The parameters must satisfy
m >= 0, l >= m, |x| <= 1. These routines avoid the overflows
that occur for the standard normalization of P_l^m(x).")
#-gsl2
(defmfun legendre-sphPlm-array
(m x &optional (size-or-array *default-sf-array-size*)
&aux (array (vdf size-or-array)))
......@@ -155,11 +158,12 @@
(((+ (dim0 array) m -1) :int) (m :int) (x :double)
((grid:foreign-pointer array) :pointer))
:outputs (array)
:documentation ; FDL
:documentation ; GSL texi
"An array of normalized associated Legendre functions
\sqrt(2l+1)/(4\pi) \sqrt(l-m)!/(l+m)! P_l^m(x),
for m >= 0, l = |m|, ..., length(array)}, |x| <= 1.0.")
#-gsl2
(defmfun legendre-sphPlm-deriv-array
(m x &optional (values-size-or-array *default-sf-array-size*)
(derivatives-size-or-array *default-sf-array-size*)
......@@ -170,14 +174,15 @@
((grid:foreign-pointer values) :pointer)
((grid:foreign-pointer derivatives) :pointer))
:outputs (values derivatives)
:documentation ; FDL
:documentation ; GSL texi
"An array of normalized associated Legendre functions
values and derivatives for m >= 0,
l = |m|, ..., length(array)}, |x| <= 1.0.")
#-gsl2
(defmfun legendre-array-size (lmax m)
"gsl_sf_legendre_array_size" ((lmax :int) (m :int))
:documentation ; FDL
:documentation ; GSL texi
"The size of result array needed for the array
versions of P_l^m(x), lmax - m + 1."
:c-return :int)
......
;; Mathieu functions
;; Liam Healy 2009-02-16 16:30:59EST mathieu.lisp
;; Time-stamp: <2012-01-13 12:01:15EST mathieu.lisp>
;; Time-stamp: <2016-08-07 21:54:15EDT mathieu.lisp>
;;
;; Copyright 2009, 2010, 2011 Liam M. Healy
;; Copyright 2009, 2010, 2011, 2012, 2016 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -34,21 +34,39 @@
;;;; Characteristic values
;;;;****************************************************************************
#-gsl2
(defmfun mathieu-a (n q)
"gsl_sf_mathieu_a"
((n :int) (q :double) (ret (:pointer (:struct sf-result))))
:gsl-version (1 9)
:documentation ; FDL
"Compute the characteristic value a_n(q) of the Mathieu function
ce_n(q,x) respectively.")
:documentation ; GSL texi
"Compute the characteristic value a_n(q) of the Mathieu function ce_n(q,x) respectively.")
#+gsl2
(defmfun mathieu-a (n q)
"gsl_sf_mathieu_a"
((n :int) (q :double))
:c-return :double
:gsl-version (2 0)
:documentation ; GSL texi
"Compute the characteristic value a_n(q) of the Mathieu function ce_n(q,x) respectively.")
#-gsl2
(defmfun mathieu-b (n q)
"gsl_sf_mathieu_b"
((n :int) (q :double) (ret (:pointer (:struct sf-result))))
:gsl-version (1 9)
:documentation ; FDL
"Compute the characteristic values b_n(q) of the Mathieu
function se_n(q,x), respectively.")
:documentation ; GSL texi
"Compute the characteristic values b_n(q) of the Mathieu function se_n(q,x), respectively.")
#+gsl2
(defmfun mathieu-b (n q)
"gsl_sf_mathieu_b"
((n :int) (q :double))
:c-return :double
:gsl-version (2 0)
:documentation ; GSL texi
"Compute the characteristic values b_n(q) of the Mathieu function se_n(q,x), respectively.")
(defmfun mathieu-a-array
(q &optional
......@@ -92,6 +110,7 @@
;;;; Angular Mathieu functions
;;;;****************************************************************************
#-gsl2
(defmfun mathieu-ce (n q x)
"gsl_sf_mathieu_ce"
((n :int) (q :double) (x :double) (ret (:pointer (:struct sf-result))))
......@@ -99,6 +118,16 @@
:documentation ; FDL
"Compute the angular Mathieu functions ce_n(q,x).")
#+gsl2
(defmfun mathieu-ce (n q x)
"gsl_sf_mathieu_ce"
((n :int) (q :double) (x :double))
:c-return :double
:gsl-version (2 0)
:documentation ; FDL
"Compute the angular Mathieu functions ce_n(q,x).")
#-gsl2
(defmfun mathieu-se (n q x)
"gsl_sf_mathieu_se"
((n :int) (q :double) (x :double) (ret (:pointer (:struct sf-result))))
......@@ -106,6 +135,15 @@
:documentation ; FDL
"Compute the angular Mathieu functions se_n(q,x).")
#+gsl2
(defmfun mathieu-se (n q x)
"gsl_sf_mathieu_se"
((n :int) (q :double) (x :double))
:c-return :double
:gsl-version (2 0)
:documentation ; FDL
"Compute the angular Mathieu functions se_n(q,x).")
(defmfun mathieu-ce-array
(q x &optional
size-or-array
......@@ -150,28 +188,48 @@
;;;; Radial Mathieu functions
;;;;****************************************************************************
#-gsl2
(defmfun mathieu-Mc (j n q x)
"gsl_sf_mathieu_Mc"
((j :int) (n :int) (q :double) (x :double) (ret (:pointer (:struct sf-result))))
:gsl-version (1 9)
:documentation ; FDL
:documentation ; GSL texi
"Compute the radial j-th kind Mathieu functions Mc_n^{(j)}(q,x) of
order n. The allowed values of j are 1 and 2. The functions for j =
3,4 can be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and
M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or
Ms_n^{(j)}.")
#+gsl2
(defmfun mathieu-Mc (j n q x)
"gsl_sf_mathieu_Mc"
((j :int) (n :int) (q :double) (x :double))
:c-return :double
:gsl-version (2 0)
:documentation ; GSL texi
"Compute the radial j-th kind Mathieu functions Mc_n^{(j)}(q,x) of order n. The allowed values of j are 1 and 2. The functions for j = 3,4 can be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or Ms_n^{(j)}.")
#-gsl2
(defmfun mathieu-Ms (j n q x)
"gsl_sf_mathieu_Ms"
((j :int) (n :int) (q :double) (x :double) (ret (:pointer (:struct sf-result))))
:gsl-version (1 9)
:documentation ; FDL
:documentation ; GSL texi
"Compute the radial j-th kind Mathieu functions Ms_n^{(j)}(q,x) of order n.
The allowed values of j are 1 and 2. The functions for j = 3,4 can
be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and M_n^{(4)} =
M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or
Ms_n^{(j)}.")
#+gsl2
(defmfun mathieu-Ms (j n q x)
"gsl_sf_mathieu_Ms"
((j :int) (n :int) (q :double) (x :double))
:c-return :double
:gsl-version (2 0)
:documentation ; GSL texi
"Compute the radial j-th kind Mathieu functions Ms_n^{(j)}(q,x) of order n. The allowed values of j are 1 and 2. The functions for j = 3,4 can be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or Ms_n^{(j)}.")
(defmfun mathieu-Mc-array
(j q x &optional
size-or-array
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment