Commit e5e286ac authored by Liam Healy's avatar Liam Healy

More GSL objects now defined with defmobject

More GSL objects now defined with defmobject; they look like they
expand correctly but are not compiled.
parent adbbbbcd
;; Chebyshev Approximations
;; Liam Healy Sat Nov 17 2007 - 20:36
;; Time-stamp: <2008-10-25 11:33:06EDT chebyshev.lisp>
;; Time-stamp: <2008-12-23 21:46:27EST chebyshev.lisp>
;; $Id$
(in-package :gsl)
#|
(defmobject chebyshev "gsl_cheb"
((order sizet))
"Chebyshev series" ; FDL
"Make a Chebyshev series of specified order."
"init"
((function :pointer) (lower-limit :double) (upper-limit :double)))
|#
;;;;****************************************************************************
;;;; Creation and calculation of Chebyshev series
;;;;****************************************************************************
......
;; Interpolation allocation, initialization, and freeing.
;; Liam Healy, Sun Nov 4 2007 - 17:24
;; Time-stamp: <2008-12-23 21:18:01EST interpolation.lisp>
;; Time-stamp: <2008-12-23 21:42:31EST interpolation.lisp>
;; $Id$
(in-package :gsl)
......@@ -66,6 +66,19 @@
:documentation ; FDL
"Frees the interpolation object interp.")
#|
(defmobject spline "gsl_spline"
((type :pointer) (size sizet))
"spline" ; FDL
"Make an interpolation object of type for size data-points."
"init"
(((c-pointer xa) :pointer) ((c-pointer ya) :pointer) ((dim0 xa) sizet))
(lambda (set)
`((type &optional xa-or-size (ya nil ,set))
(:type type :size (if ,set (dim0 ya) xa-or-size))
(:xa xa-or-size :ya ya))))
|#
(defgo spline (type xa-or-size &optional ya)
(list
`(allocate-spline ,type ,(if ya `(dim0 ,ya) xa-or-size))
......
;; Series acceleration.
;; Liam Healy, Wed Nov 21 2007 - 18:41
;; Time-stamp: <2008-11-30 23:45:16EST series-acceleration.lisp>
;; Time-stamp: <2008-12-23 22:10:48EST series-acceleration.lisp>
;; $Id$
(in-package :gsl)
......@@ -21,6 +21,14 @@
(dq-den :pointer)
(dsum :pointer))
#|
(defmobject levin "gsl_sum_levin_u"
((order sizet))
"Levin u-transform" ; FDL
"Make a workspace for a Levin u-transform of n
terms. The size of the workspace is O(2n^2 + 3n).")
|#
(defgo-s (levin order) allocate-levin free-levin)
(defmfun allocate-levin (order)
......@@ -61,6 +69,15 @@
;;;; Acceleration with error estimation from truncation
;;;;****************************************************************************
#|
(defmobject levin-truncated "gsl_sum_levin_utrunc"
((order sizet))
"truncated Levin u-transform" ; FDL
"Make a workspace for a Levin u-transform of n
terms, without error estimation. The size of the workspace is
O(3n).")
|#
(defgo-s (levin-truncated order) allocate-levin-truncated free-levin-truncated)
(defmfun allocate-levin-truncated (order)
......
;; Nonlinear least squares fitting.
;; Liam Healy, 2008-02-09 12:59:16EST nonlinear-least-squares.lisp
;; Time-stamp: <2008-11-30 23:31:40EST nonlinear-least-squares.lisp>
;; Time-stamp: <2008-12-23 22:32:19EST nonlinear-least-squares.lisp>
;; $Id$
(in-package :gsl)
......@@ -12,6 +12,15 @@
;;; Note that there are currently no derivative-free solvers provided,
;;; so this is a bit pointless.
#|
(defmobject nonlinear-ffit "gsl_multifit_fsolver"
((solver-type :pointer) (number-of-observations sizet) (number-of-parameters sizet))
"nonlinear least squares fit with function only" ; FDL
"The number of observations must be greater than or equal to parameters."
"set"
((function :pointer) ((mpointer initial-guess) :pointer)))
|#
(defgo-s (nonlinear-ffit solver-type number-of-observations number-of-parameters
function initial-guess)
allocate-ffit free-ffit set-ffit 3)
......@@ -53,6 +62,16 @@
;;;; Function and derivative solver object
;;;;****************************************************************************
#|
(defmobject nonlinear-fdffit "gsl_multifit_fsolver"
((solver-type :pointer) (number-of-observations sizet) (number-of-parameters sizet))
"nonlinear least squares fit with function and derivative" ; FDL
"The number of observations must be greater than or
equal to parameters."
"set"
((function :pointer) ((mpointer initial-guess) :pointer)))
|#
(defgo-s (nonlinear-fdffit solver-type number-of-observations number-of-parameters
functions initial-guess)
allocate-fdffit free-fdffit set-fdffit 3)
......
;; One-dimensional root solver.
;; Liam Healy
;; Time-stamp: <2008-11-16 14:34:13EST roots-one.lisp>
;; Time-stamp: <2008-12-23 22:39:13EST roots-one.lisp>
;; $Id$
(in-package :gsl)
......@@ -44,6 +44,22 @@
;;;; Initialization
;;;;****************************************************************************
#|
(defmobject fsolver "gsl_root_fsolver"
((type :pointer))
"one-dimensional root solver with function only" ; FDL
""
"set"
((function :pointer) (lower :double) (upper :double)))
(defmobject fdfsolver "gsl_root_fdfsolver"
((type :pointer))
"one-dimensional root solver with function and derivative" ; FDL
""
"set"
((function-derivative :pointer) (root-guess :double)))
|#
(defgo-s (fsolver type function lower upper) allocate-fsolver free-fsolver set-fsolver)
(defgo-s (fdfsolver type function-derivative root-guess)
allocate-fdfsolver free-fdfsolver set-fdfsolver)
......
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