Commit 679dc967 authored by liam's avatar liam

On the rest of the files:

  Rename defun-gsl, defvariable.
  Clean up markup and header files.
  :size to size
  make-tests and assert-numerical-equal


git-svn-id: svn+ssh://pop/opt/space/mathematics/gsl/trunk@3295 a3d8a0fb-c1db-0310-ace7-a616afeb9e30
parent aefc0853
;; Chebyshev Approximations
;; Liam Healy Sat Nov 17 2007 - 20:36
;; Time-stamp: <2008-02-03 13:22:58EST chebyshev.lisp>
;; Time-stamp: <2008-02-17 18:02:26EST chebyshev.lisp>
;; $Id: $
(in-package :gsl)
......@@ -12,36 +12,36 @@
(defgo-s (chebyshev order function lower-limit upper-limit)
allocate-chebyshev free-chebyshev initialize-chebyshev)
(defun-gsl allocate-chebyshev (order)
(defmfun allocate-chebyshev (order)
"gsl_cheb_alloc"
((order :size))
((order size))
:c-return :pointer
:export nil
:index (letm chebyshev)
:documentation
:documentation ; FDL
"Allocate a Chebyshev series of specified order
and return a pointer to it.")
(defun-gsl free-chebyshev (chebyshev)
(defmfun free-chebyshev (chebyshev)
"gsl_cheb_free"
((chebyshev :pointer))
:c-return :void
:export nil
:index (letm chebyshev)
:documentation
:documentation ; FDL
"Free a previously allocated Chebyshev series.")
(defun-gsl initialize-chebyshev (chebyshev function lower-limit upper-limit)
(defmfun initialize-chebyshev (chebyshev function lower-limit upper-limit)
"gsl_cheb_init"
((chebyshev :pointer) (function :pointer)
(lower-limit :double) (upper-limit :double))
:export nil
:index (letm chebyshev)
:documentation
:documentation ; FDL
"Compute the Chebyshev approximation for the function over the range
(lower-limit, upper-limit) to the previously specified order. The
computation of the Chebyshev approximation is an @math{O(n^2)}
process, and requires @math{n} function evaluations.")
computation of the Chebyshev approximation is an O(n^2)
process, and requires n function evaluations.")
;;;;****************************************************************************
;;;; Chebyshev series evaluation
......@@ -51,45 +51,45 @@
;;; to use the functions that do return error (and ignore it if
;;; desired) in the form of #'evaluate-chebyshev.
(defun-gsl evaluate-chebyshev-noerror (chebyshev x)
(defmfun evaluate-chebyshev-noerror (chebyshev x)
"gsl_cheb_eval"
((chebyshev :pointer) (x :double))
:c-return :double
:index evaluate-chebyshev
:export nil
:documentation
:documentation ; FDL
"Evaluate the Chebyshev series at a point x.")
(defun-gsl evaluate-chebyshev-noerror-order (chebyshev x order)
(defmfun evaluate-chebyshev-noerror-order (chebyshev x order)
"gsl_cheb_eval_n"
((chebyshev :pointer) (order :size) (x :double))
((chebyshev :pointer) (order size) (x :double))
:c-return :double
:index evaluate-chebyshev
:export nil
:documentation
:documentation ; FDL
"Evaluate the Chebyshev series at a point x to at most the given order.")
(defun-gsl evaluate-chebyshev-full (chebyshev x)
(defmfun evaluate-chebyshev-full (chebyshev x)
"gsl_cheb_eval_err"
((chebyshev :pointer) (x :double) (result :double) (abserr :double))
:index evaluate-chebyshev
:export nil
:documentation
:documentation ; FDL
"Evaluate the Chebyshev series at a point x, returning result and
an estimate of its absolute error.")
(defun-gsl evaluate-chebyshev-order (chebyshev x order)
(defmfun evaluate-chebyshev-order (chebyshev x order)
"gsl_cheb_eval_n_err"
((chebyshev :pointer) (order :size) (x :double) (result :double) (abserr :double))
((chebyshev :pointer) (order size) (x :double) (result :double) (abserr :double))
:index evaluate-chebyshev
:export nil
:documentation
:documentation ; FDL
"Evaluate the Chebyshev series at a point x to at most the given order,
returning result and an estimate of its absolute error.")
(export 'evaluate-chebyshev)
(defun-optionals evaluate-chebyshev (chebyshev x &optional order)
-full -order
-full -order ; FDL
"Evaluate the Chebyshev series at a point x to at most the given order,
returning result and an estimate of its absolute error.")
......@@ -97,18 +97,18 @@
;;;; Derivatives and integrals
;;;;****************************************************************************
(defun-gsl derivative-chebyshev (derivative chebyshev)
(defmfun derivative-chebyshev (derivative chebyshev)
"gsl_cheb_calc_deriv"
((derivative :pointer) (chebyshev :pointer))
:documentation
:documentation ; FDL
"Compute the derivative of the Chebyshev series, storing
the derivative coefficients in the previously allocated series.
The two series must have been allocated with the same order.")
(defun-gsl integral-chebyshev (integral chebyshev)
(defmfun integral-chebyshev (integral chebyshev)
"gsl_cheb_calc_integ"
((integral :pointer) (chebyshev :pointer))
:documentation
:documentation ; FDL
"Compute the integral of the Chebyshev series, storing
the integral coefficients in the previously allocated series.
The two series must have been allocated with the same order.
......@@ -147,7 +147,16 @@
(evaluate-chebyshev deriv x)
(evaluate-chebyshev integ x))))
(lisp-unit:define-test chebyshev
(lisp-unit:assert-equal
'("0.715920990169d+00" "-0.150199666581d+01" "0.172397194040d+00")
(lisp-unit:fp-sequence (chebyshev-point-example 0.55d0))))
#|
(make-tests chebyshev
(chebyshev-point-example 0.55d0))
|#
(LISP-UNIT:DEFINE-TEST CHEBYSHEV
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST 0.7159209901689866d0 -1.5019966658054353d0
0.17239719403979925d0))
(MULTIPLE-VALUE-LIST (CHEBYSHEV-POINT-EXAMPLE 0.55d0))))
;********************************************************
; file: block.lisp
; description: Blocks of data
; date: Mon Mar 27 2006 - 12:28
; author: Liam M. Healy
; modified: Wed May 31 2006 - 19:00
;********************************************************
;;; $Id: $
;; Blocks of data
;; Liam Healy, Mon Mar 27 2006 - 12:28
;; Time-stamp: <2008-02-17 09:18:05EST block.lisp>
;; $Id: $
(in-package :gsl)
;;; Block definition
(cffi:defcstruct block
(size :size)
(size size)
(data :pointer))
(defdata "block" block-double double-float)
......
;; Combinations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2008-02-04 19:25:57EST combination.lisp>
;; Time-stamp: <2008-02-17 10:01:38EST combination.lisp>
;; $Id: $
(in-package :gsl)
......@@ -11,8 +11,8 @@
;;; GSL-combination definition
(cffi:defcstruct gsl-combination-c
(n :size)
(k :size)
(n size)
(k size)
(data :pointer))
;;; Allocation, freeing, reading and writing
......@@ -25,11 +25,11 @@
;;;; Getting values
;;;;****************************************************************************
(defun-gsl gsl-aref ((combination gsl-combination) &rest indices)
(defmfun gsl-aref ((combination gsl-combination) &rest indices)
"gsl_combination_get"
(((pointer combination) :pointer) ((first indices) :size))
(((pointer combination) :pointer) ((first indices) size))
:type :method
:c-return :size
:c-return size
:documentation ; FDL
"The ith element of the combination.")
......@@ -45,7 +45,7 @@
;;;; Setting values
;;;;****************************************************************************
(defun-gsl init-first (combination)
(defmfun init-first (combination)
"gsl_combination_init_first"
(((pointer combination) gsl-combination-c))
:c-return :void
......@@ -54,7 +54,7 @@
"Initialize the combination c to the lexicographically
first combination, i.e. (0,1,2,...,k-1).")
(defun-gsl init-last (combination)
(defmfun init-last (combination)
"gsl_combination_init_last"
(((pointer combination) gsl-combination-c))
:c-return :void
......@@ -63,7 +63,7 @@
"Initialize the combination c to the lexicographically
last combination, i.e. (n-k,n-k+1,...,n-1).")
(defun-gsl copy (destination source)
(defmfun copy (destination source)
"gsl_combination_memcpy"
(((pointer destination) gsl-combination-c)
((pointer source) gsl-combination-c))
......@@ -77,23 +77,23 @@
;;;; Combination properties
;;;;****************************************************************************
(defun-gsl combination-range (c)
(defmfun combination-range (c)
"gsl_combination_n"
(((pointer c) gsl-combination-c))
:c-return :size
:c-return size
:documentation ; FDL
"The range (n) of the combination c.")
(defun-gsl combination-size (c)
(defmfun combination-size (c)
"gsl_combination_k"
(((pointer c) gsl-combination-c))
:c-return :size
:c-return size
:documentation ; FDL
"The number of elements (k) in the combination c.")
#|
;;; Unnecessary, gsl-array serves this function.
(defun-gsl combination-data (c)
(defmfun combination-data (c)
"gsl_combination_data"
(((pointer c) gsl-combination-c))
:c-return :pointer
......@@ -101,7 +101,7 @@
"A pointer to the array of elements in the combination.")
|#
(defun-gsl data-valid ((combination gsl-combination))
(defmfun data-valid ((combination gsl-combination))
"gsl_combination_valid"
(((pointer combination) :pointer))
:type :method
......@@ -115,7 +115,7 @@
;;;; Combination functions
;;;;****************************************************************************
(defun-gsl combination-next (c)
(defmfun combination-next (c)
"gsl_combination_next" (((pointer c) gsl-combination-c))
:c-return :success-failure
:invalidate (c)
......@@ -127,7 +127,7 @@
repeatedly applying this function will iterate through all possible
combinations of a given order.")
(defun-gsl combination-previous (c)
(defmfun combination-previous (c)
"gsl_combination_prev"
(((pointer c) gsl-combination-c))
:c-return :success-failure
......@@ -142,33 +142,64 @@
;;;; Examples and unit test
;;;;****************************************************************************
(lisp-unit:define-test combination
(lisp-unit:assert-eql ; combination-range
4
(letm ((comb (combination 4 2 t)))
(combination-range comb)))
(lisp-unit:assert-eql ; combination-size
2
(letm ((comb (combination 4 2 t)))
(combination-size comb)))
(lisp-unit:assert-equal ; init-first, combination-next
'((0 1) (0 2) (0 3) (1 2) (1 3) (2 3))
(letm ((comb (combination 4 2 t)))
#|
(make-tests combination
(letm ((comb (combination 4 2 t))) ; combination-range
(combination-range comb))
(letm ((comb (combination 4 2 t))) ; combination-size
(combination-size comb))
(letm ((comb (combination 4 2 t))) ; init-first, combination-next
(init-first comb)
(loop collect (data comb)
while (combination-next comb))))
(lisp-unit:assert-equal ; init-last, combination-previous
'((2 3) (1 3) (1 2) (0 3) (0 2) (0 1))
(letm ((comb (combination 4 2 t)))
while (combination-next comb)))
(letm ((comb (combination 4 2 t))) ; init-last, combination-previous
(init-last comb)
(loop collect (data comb)
while (combination-previous comb))))
(lisp-unit:assert-equal ; combination-next
'(NIL (0) (1) (2) (3) (0 1) (0 2) (0 3) (1 2) (1 3) (2 3)
(0 1 2) (0 1 3) (0 2 3) (1 2 3) (0 1 2 3))
(loop for i from 0 to 4
while (combination-previous comb)))
(loop for i from 0 to 4 ; combination-next
append
(letm ((comb (combination 4 i t)))
(init-first comb)
(loop collect (data comb)
while (combination-next comb))))))
while (combination-next comb)))))
|#
(LISP-UNIT:DEFINE-TEST COMBINATION
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 4)
(MULTIPLE-VALUE-LIST
(LETM ((COMB (COMBINATION 4 2 T)))
(COMBINATION-RANGE COMB))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 2)
(MULTIPLE-VALUE-LIST
(LETM ((COMB (COMBINATION 4 2 T)))
(COMBINATION-SIZE COMB))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST (LIST 0 1) (LIST 0 2) (LIST 0 3) (LIST 1 2)
(LIST 1 3) (LIST 2 3)))
(MULTIPLE-VALUE-LIST
(LETM ((COMB (COMBINATION 4 2 T))) (INIT-FIRST COMB)
(LOOP COLLECT (DATA COMB) WHILE
(COMBINATION-NEXT COMB)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST (LIST (LIST 2 3) (LIST 1 3) (LIST 1 2) (LIST 0 3)
(LIST 0 2) (LIST 0 1)))
(MULTIPLE-VALUE-LIST
(LETM ((COMB (COMBINATION 4 2 T))) (INIT-LAST COMB)
(LOOP COLLECT (DATA COMB) WHILE
(COMBINATION-PREVIOUS COMB)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST (LIST) (LIST 0) (LIST 1) (LIST 2) (LIST 3)
(LIST 0 1) (LIST 0 2) (LIST 0 3) (LIST 1 2)
(LIST 1 3) (LIST 2 3) (LIST 0 1 2) (LIST 0 1 3)
(LIST 0 2 3) (LIST 1 2 3) (LIST 0 1 2 3)))
(MULTIPLE-VALUE-LIST
(LOOP FOR I FROM 0 TO 4 APPEND
(LETM ((COMB (COMBINATION 4 I T)))
(INIT-FIRST COMB)
(LOOP COLLECT (DATA COMB) WHILE
(COMBINATION-NEXT COMB)))))))
;; Using GSL storage.
;; Using GSL bulk data (vectors, matrices, etc.) storage.
;; Liam Healy, Sun Mar 26 2006 - 16:32
;; Time-stamp: <2008-02-10 15:30:20EST data.lisp>
;; Time-stamp: <2008-02-17 09:18:27EST data.lisp>
;; $Id: $
(in-package :gsl)
......@@ -94,7 +94,7 @@
(setf (pointer object) pointer))
;;; (args (loop for i below dimensions collect (intern (format nil "I~d" i))))
;;; (mapcar (lambda (v) `(,v :size)) args)
;;; (mapcar (lambda (v) `(,v size)) args)
(defparameter *data-name-alist*
'((FIXNUM . "_int")
......@@ -163,7 +163,7 @@
(flet ((gsl-name (function-name)
(format nil "gsl_~a_~a" c-string function-name)))
(let* ((cargs (loop for i below dimensions
collect `((nth ,i (storage-size object)) :size)))
collect `((nth ,i (storage-size object)) size)))
(object-name (make-symbol-from-strings *gsl-prefix* cl-symbol)))
`(progn
(defclass ,object-name (,superclass)
......@@ -171,31 +171,31 @@
:allocation :class)))
(data-go ,cl-symbol
,(or (member superclass '(gsl-matrix)) (member object-name '(gsl-combination))))
(defun-gsl alloc ((object ,object-name))
(defmfun alloc ((object ,object-name))
,(gsl-name "alloc") ,cargs
:type :method
:c-return (cr :pointer)
:return ((assign-pointer object cr)))
(defun-gsl calloc ((object ,object-name))
(defmfun calloc ((object ,object-name))
,(gsl-name "calloc") ,cargs
:type :method
:c-return (cr :pointer)
:return ((assign-pointer object cr)))
(defun-gsl free ((object ,object-name))
(defmfun free ((object ,object-name))
,(gsl-name "free") (((pointer object) :pointer))
:type :method
:c-return :void)
(defun-gsl write-binary ((object ,object-name) stream)
(defmfun write-binary ((object ,object-name) stream)
,(gsl-name "fwrite") ((stream :pointer) ((pointer object) :pointer))
:type :method)
(defun-gsl read-binary ((object ,object-name) stream)
(defmfun read-binary ((object ,object-name) stream)
,(gsl-name "fread") ((stream :pointer) ((pointer object) :pointer))
:type :method)
(defun-gsl write-formatted ((object ,object-name) stream format)
(defmfun write-formatted ((object ,object-name) stream format)
,(gsl-name "fprintf")
((stream :pointer) ((pointer object) :pointer) (format :string))
:type :method)
(defun-gsl read-formatted ((object ,object-name) stream format)
(defmfun read-formatted ((object ,object-name) stream format)
,(gsl-name "fscanf")
((stream :pointer) ((pointer object) :pointer) (format :string))
:type :method)))))
......@@ -213,13 +213,13 @@
;;; (make-symbol-from-strings *gsl-prefix* 'vector-fixnum)
;;; GSL-VECTOR-FIXNUM
(defun defun-gsl-all (types ctypes string general-class args)
"A defun-gsl for each of the declared data types."
(defun defmfun-all (types ctypes string general-class args)
"A defmfun for each of the declared data types."
`(progn
,@(loop for type in types
for ctype in ctypes
collect
`(defun-gsl ,(first args)
`(defmfun ,(first args)
;; Set the class name for the arglist
,(mapcar
(lambda (x)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
;; Eigenvectors and eigenvalues
;; Liam Healy, Sun May 21 2006 - 19:52
;; Time-stamp: <2008-02-03 14:14:10EST eigensystems.lisp>
;; Time-stamp: <2008-02-17 11:32:46EST eigensystems.lisp>
;; $Id: $
(in-package :gsl)
......@@ -11,8 +11,8 @@
(defgo-s (eigen-symm n) eigen-symm-alloc eigen-symm-free)
(defun-gsl eigen-symm-alloc (n)
"gsl_eigen_symm_alloc" ((n :size))
(defmfun eigen-symm-alloc (n)
"gsl_eigen_symm_alloc" ((n size))
:c-return :pointer
:export nil
:index '(letm eigen-symm)
......@@ -21,7 +21,7 @@
n-by-n real symmetric matrices. The size of the workspace
is O(2n).")
(defun-gsl eigen-symm-free (w)
(defmfun eigen-symm-free (w)
"gsl_eigen_symm_free" ((w :pointer))
:c-return :void
:export nil
......@@ -31,8 +31,8 @@
(defgo-s (eigen-symmv n) eigen-symmv-alloc eigen-symmv-free)
(defun-gsl eigen-symmv-alloc (n)
"gsl_eigen_symmv_alloc" ((n :size))
(defmfun eigen-symmv-alloc (n)
"gsl_eigen_symmv_alloc" ((n size))
:c-return :pointer
:export nil
:index '(letm eigen-symmv)
......@@ -41,26 +41,26 @@
eigenvectors of n-by-n real symmetric matrices. The size of
the workspace is O(4n).")
(defun-gsl eigen-symmv-free (w)
(defmfun eigen-symmv-free (w)
"gsl_eigen_symmv_free" ((w :pointer))
:index '(letm eigen-symmv)
:c-return :void
:documentation ; FDL
"Free the memory associated with the workspace w.")
(defun-gsl eigenvalues-symmetric (A eval ws)
(defmfun eigenvalues-symmetric (A eval ws)
"gsl_eigen_symm" ((A gsl-matrix-c) (eval gsl-vector-c) (ws :pointer))
:documentation ; FDL
"Eigenvalues of the real symmetric matrix
A. Additional workspace of the appropriate size must be provided
in w. The diagonal and lower triangular part of A are
destroyed during the computation, but the strict upper triangular part
is not referenced. The eigenvalues are stored in the vector @var{eval}
is not referenced. The eigenvalues are stored in the vector eval
and are unordered."
:invalidate (A eval)
:return (eval))
(defun-gsl eigenvalues-eigenvectors-symmetric (A eval evec ws)
(defmfun eigenvalues-eigenvectors-symmetric (A eval evec ws)
"gsl_eigen_symmv"
(((pointer A) :pointer) ((pointer eval) :pointer)
((pointer evec) :pointer) (ws :pointer))
......@@ -84,21 +84,21 @@
(defgo-s (eigen-herm n) eigen-herm-alloc eigen-herm-free)
(defun-gsl eigen-herm-alloc (n)
"gsl_eigen_herm_alloc" ((n :size))
(defmfun eigen-herm-alloc (n)
"gsl_eigen_herm_alloc" ((n size))
:documentation ; FDL
"Allocate a workspace for computing eigenvalues of
n-by-n complex hermitian matrices. The size of the workspace
is O(3n)."
:c-return :pointer)
(defun-gsl eigen-herm-free (w)
(defmfun eigen-herm-free (w)
"gsl_eigen_herm_free" ((w :pointer))
:c-return :void
:documentation ; FDL
"Free the memory associated with the workspace w.")
(defun-gsl eigenvalues-hermitian (A eval w)
(defmfun eigenvalues-hermitian (A eval w)
"gsl_eigen_herm"
(((pointer A) gsl-matrix-c) ((pointer eval) gsl-vector-c) (w :pointer))
:documentation ; FDL
......@@ -108,27 +108,27 @@
destroyed during the computation, but the strict upper triangular part
is not referenced. The imaginary parts of the diagonal are assumed to be
zero and are not referenced. The eigenvalues are stored in the vector
@var{eval} and are unordered."
eval and are unordered."
:invalidate (eval A)
:return (eval))
(defgo-s (eigen-hermv n) eigen-hermv-alloc eigen-hermv-free)
(defun-gsl eigen-hermv-alloc (n)
"gsl_eigen_hermv_alloc" ((n :size))
(defmfun eigen-hermv-alloc (n)
"gsl_eigen_hermv_alloc" ((n size))
:documentation ; FDL
"Allocate a workspace for computing eigenvalues and
eigenvectors of n-by-n complex hermitian matrices. The size of
the workspace is O(5n)."
:c-return :pointer)
(defun-gsl eigen-hermv-free (w)
(defmfun eigen-hermv-free (w)
"gsl_eigen_hermv_free" ((w :pointer))
:c-return :void
:documentation ; FDL
"Free the memory associated with the workspace w.")
(defun-gsl eigenvalues-eigenvectors-hermitian (A eval evec w)
(defmfun eigenvalues-eigenvectors-hermitian (A eval evec w)
"gsl_eigen_hermv"
(((pointer A) gsl-matrix-c) ((pointer eval) gsl-vector-c)
((pointer evec) gsl-matrix-c) (w :pointer))
......@@ -164,14 +164,14 @@
the value of the parameter sort-type: :value-ascending,
:value-descending, :absolute-ascending, :absolute-descending."))
(defun-gsl sort-eigenvalues-eigenvectors
(defmfun sort-eigenvalues-eigenvectors
((eval gsl-vector-double) evec sort-type)
"gsl_eigen_symmv_sort"
((eval gsl-vector-c) (evec gsl-matrix-c) (sort-type eigen-sort-type))
:type :method
:invalidate (eval evec))
(defun-gsl sort-eigenvalues-eigenvectors
(defmfun sort-eigenvalues-eigenvectors
((eval gsl-vector-complex) evec sort-type)
"gsl_eigen_hermv_sort"
((eval gsl-vector-c) (evec gsl-matrix-c) (sort-type eigen-sort-type))
......@@ -194,9 +194,16 @@
(values (data evals) (data evecs))))
#|
#(13.819660112501051d0 36.180339887498945d0 40.0d0)
#2A((0.8506508083520399d0 -0.5257311121191336d0 0.0d0)
(0.5257311121191336d0 0.8506508083520399d0 0.0d0)
(0.0d0 0.0d0 1.0d0))
(make-tests eigensystems
(eigenvalue-eigenvectors-example))
|#
(LISP-UNIT:DEFINE-TEST EIGENSYSTEMS
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(13.819660112501051d0 36.180339887498945d0 40.0d0)
#2A((0.8506508083520399d0 -0.5257311121191337d0 0.0d0)
(0.5257311121191337d0 0.8506508083520399d0 0.0d0)
(0.0d0 0.0d0 1.0d0)))
(MULTIPLE-VALUE-LIST
(EIGENVALUE-EIGENVECTORS-EXAMPLE))))
;; Definition of GSLL system
;; Liam Healy
;; Time-stamp: <2008-02-16 10:59:40EST gsll.asd>
;; Time-stamp: <2008-02-17 18:41:29EST gsll.asd>
;; $Id: $
(asdf:defsystem "gsll"
......@@ -18,7 +18,7 @@
(:file "utility" :depends-on (init))
(:file "gsl-objects" :depends-on (init))
(:file "number-conversion" :depends-on (init))
(:file "interface" :depends-on (conditions init number-conversion))
(:file "interface" :depends-on (init conditions number-conversion))
(:file "callback" :depends-on (init))
;; http://www.cs.northwestern.edu/academics/courses/325/readings/lisp-unit.html
(:file "lisp-unit")
......
;; Discrete Hankel Transforms.
;; Liam Healy, Sat Dec 8 2007 - 16:50
;; Time-stamp: <2008-02-03 13:22:56EST hankel.lisp>
;; Time-stamp: <2008-02-17 18:10:15EST hankel.lisp>
;; $Id: $
(in-package :gsl)
......@@ -9,65 +9,63 @@
(defgo-s (hankel size nu xmax) allocate-hankel free-hankel init-hankel)
(defun-gsl allocate-hankel (size)
(defmfun allocate-hankel (size)
"gsl_dht_alloc"
((size :size))
((size size))
:c-return :pointer
:export nil
:index (letm hankel)
:documentation
"Allocate a Discrete Hankel transform object of size @var{size}.")
:documentation ; FDL
"Allocate a Discrete Hankel transform object of given size.")
(defun-gsl init-hankel (hankel nu xmax)
(defmfun init-hankel (hankel nu xmax)
"gsl_dht_new"
((hankel :pointer) (nu :double) (xmax :double))
:export nil
:index (letm hankel)
:documentation
"Initialize the transform @var{t} for the given values of
@var{nu} and @var{x}.")
:documentation ; FDL
"Initialize the transform for the given values of nu and x.")
;; This seems redundant; does it effectively combine allocate-hankel
;; and init-hankel? In this case we don't really need, and shouldn't
;; export it.
(defun-gsl new-hankel (size nu xmax)
(defmfun new-hankel (size nu xmax)
"gsl_dht_new"
((size :size) (nu :double) (xmax :double))
((size size) (nu :double) (xmax :double))
:c-return :pointer
:documentation
:documentation ; FDL
"Allocate a Discrete Hankel transform object of size
@var{size} and initializes it for the given values of @var{nu} and
@var{x}.")
size and initializes it for the given values of nu and
xmax.")
(defun-gsl free-hankel (hankel)
(defmfun free-hankel (hankel)
"gsl_dht_free"
((hankel :pointer))
:c-return :void
:export nil
:index (letm hankel)
:documentation
:documentation ; FDL
"Free the Hankel object.")
(defun-gsl apply-hankel (hankel array-in array-out)
(defmfun apply-hankel (hankel array-in array-out)
"gsl_dht_apply"