types.lisp 2.75 KB
Newer Older
liam's avatar
liam committed
1 2
;; Interpolation types
;; Liam Healy, Sun Nov  4 2007 - 17:41
Liam Healy's avatar
Liam Healy committed
3
;; Time-stamp: <2009-02-16 09:46:04EST types.lisp>
lhealy's avatar
lhealy committed
4
;; $Id$
5 6 7

(in-package :gsl)

Liam Healy's avatar
Liam Healy committed
8
(defmpar +linear-interpolation+ "gsl_interp_linear"
liam's avatar
liam committed
9
  ;; FDL
10 11 12
  "Linear interpolation.  This interpolation method does not require any
   additional memory.")

Liam Healy's avatar
Liam Healy committed
13
(defmpar +polynomial-interpolation+ "gsl_interp_polynomial"
liam's avatar
liam committed
14
  ;; FDL
15 16 17 18 19 20
  "Polynomial interpolation.  This method should only be used for
   interpolating small numbers of points because polynomial interpolation
   introduces large oscillations, even for well-behaved datasets.  The
   number of terms in the interpolating polynomial is equal to the number
   of points.")

Liam Healy's avatar
Liam Healy committed
21
(defmpar +cubic-spline-interpolation+ "gsl_interp_cspline"
liam's avatar
liam committed
22
  ;; FDL
23 24 25 26 27
  "Cubic spline with natural boundary conditions.  The resulting curve is
   piecewise cubic on each interval, with matching first and second
   derivatives at the supplied data-points.  The second derivative is
   chosen to be zero at the first point and last point.")

Liam Healy's avatar
Liam Healy committed
28
(defmpar +periodic-cubic-spline-interpolation+ "gsl_interp_cspline_periodic"
liam's avatar
liam committed
29
  ;; FDL
30 31 32 33 34 35 36 37
  "Cubic spline with periodic boundary conditions.  The resulting curve
   is piecewise cubic on each interval, with matching first and second
   derivatives at the supplied data-points.  The derivatives at the first
   and last points are also matched.  Note that the last point in the
   data must have the same y-value as the first point, otherwise the
   resulting periodic interpolation will have a discontinuity at the
   boundary.")

Liam Healy's avatar
Liam Healy committed
38
(defmpar +akima-interpolation+ "gsl_interp_akima"
liam's avatar
liam committed
39
  ;; FDL
40 41 42
  "Non-rounded Akima spline with natural boundary conditions.  This method
   uses the non-rounded corner algorithm of Wodicka.")

Liam Healy's avatar
Liam Healy committed
43
(defmpar +periodic-akima-interpolation+ "gsl_interp_akima_periodic"
liam's avatar
liam committed
44
  ;; FDL
45 46 47
  "Non-rounded Akima spline with periodic boundary conditions.  This method
   uses the non-rounded corner algorithm of Wodicka.")

48
(defmfun name ((interpolation interpolation))
49 50
  "gsl_interp_name"
  ((interpolation :pointer))
51
  :definition :method
52
  :c-return :string
liam's avatar
liam committed
53
  :documentation			; FDL
54
  "The name of the interpolation type.")
55

56 57 58 59
(export 'minimum-size)
(defgeneric minimum-size (object)
  (:documentation			; FDL
   "The minimum number of points required by the
60
   interpolation.  For example, Akima spline interpolation
61 62 63 64 65 66 67
   requires a minimum of 5 points."))

(defmfun minimum-size ((object interpolation))
  "gsl_interp_min_size"
  ((object :pointer))
  :definition :method
  :c-return :uint)
68

69
(defmfun name ((object spline))
70
  "gsl_spline_name"
71
  ((object :pointer))
72
  :definition :method
73
  :c-return :string
liam's avatar
liam committed
74
  :documentation			; FDL
75
  "The name of the interpolation type.")
76

77
(defmfun minimum-size ((object spline))
78
  "gsl_spline_min_size"
79 80 81
  ((object :pointer))
  :definition :method
  :c-return :uint)