diff --git a/gsll.asd b/gsll.asd index b2873e26d955f85b3b4a7c3fb844e7e3a63819e6..8d3b2f22f404fc4dca5b390f5a1d7be5b79fe795 100644 --- a/gsll.asd +++ b/gsll.asd @@ -12,23 +12,23 @@ :description "GNU Scientific Library for Lisp." :version "0" :author "Liam M. Healy" - :licence "GPL" - :depends-on (cffi cffi-unix) ; http://www.cliki.net/cffi-unix + :licence "GPL v3" + :depends-on (cffi) :components ((:module init :components ((:file "init") + (:file "conditions" :depends-on (init)) (:file "utility" :depends-on (init)) (:file "number-conversion" :depends-on (init)) - (:file "interface" :depends-on (init number-conversion)) + (:file "interface" :depends-on (conditions init number-conversion)) ;; http://www.cs.northwestern.edu/academics/courses/325/readings/lisp-unit.html (:file "lisp-unit") (:file "tests" :depends-on (init lisp-unit)))) (:module general :depends-on (init) :components - ((:file "conditions") - (:file "mathematical") + ((:file "mathematical") (:file "functions"))) ;; complex numbers not necessary? Just make a struct. (:module data diff --git a/general/conditions.lisp b/init/conditions.lisp similarity index 100% rename from general/conditions.lisp rename to init/conditions.lisp diff --git a/init/init.lisp b/init/init.lisp index 28069bfa3c63003a8c5d314ec73e0557c4b73bdf..87dc5d54636e0f442858e8f78ca337e95b8abaad 100644 --- a/init/init.lisp +++ b/init/init.lisp @@ -1,10 +1,7 @@ -;******************************************************** -; file: init.lisp -; description: Load GSL -; date: Sat Mar 4 2006 - 18:53 -; author: Liam M. Healy -; modified: Sat Sep 15 2007 - 18:59 -;******************************************************** +;; Load GSL +;; Liam Healy Sat Mar 4 2006 - 18:53 +;; Time-stamp: <2008-01-16 18:50:15 liam init.lisp> +;; $Id: $ (defpackage gsll (:nicknames :gsl) @@ -22,5 +19,15 @@ (cffi:use-foreign-library libgsl) -;;; If cffi-unix is unavailable, uncomment the following line: -;;; (cffi:defctype :size :unsigned-long) +;;; The following define :size, from cffi-unix which became cffi-net, +;;; which is apparently turning into something even bigger and more +;;; irrelevant. + +(cffi:defctype :uint32 :unsigned-int) +(cffi:defctype :uint64 :unsigned-long) +(cffi:defctype :size + #-cffi-features:no-long-long :uint64 + #+cffi-features:no-long-long + #.(progn (cerror "Use :uint32 instead." + "This platform does not support long long types.") + :uint32)) diff --git a/roots-multi.lisp b/roots-multi.lisp index f5c4cf1a0db2b91307f68fa55a1d72d75d52646a..d643587a05e0d2c57b99793f0c31ec5c340a4713 100644 --- a/roots-multi.lisp +++ b/roots-multi.lisp @@ -1,6 +1,6 @@ ;;; Multivariate roots. ;;; Liam Healy 2008-01-12 12:49:08 -;;; Time-stamp: <2008-01-15 22:44:27 liam roots-multi.lisp> +;;; Time-stamp: <2008-01-16 19:31:03EST roots-multi.lisp> ;;; $Id: $ (in-package :gsl) @@ -397,6 +397,7 @@ (defparameter *gsl-vector* (make-instance 'gsl-vector-double :pointer nil :storage-size nil)) +#| ;;; One alternative way of writing the function, not recommended. (defun rosenbrock (argument return) "Rosenbrock test function." @@ -404,6 +405,7 @@ ((vector-data return) f0 f1)) (setf f0 (* *rosenbrock-a* (- 1 x0)) f1 (* *rosenbrock-b* (- x1 (expt x0 2)))))) +|# ;;; The recommended alternative (defun rosenbrock (argument return)