Commit c1216004 by Liam M. Healy

Foreign type name :sizet from CFFI replaces 'cffi:sizet

parent 7151b5bb
;; Basis splines.
;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp
;; Time-stamp: <2011-05-26 12:37:29EDT basis-splines.lisp>
;; Time-stamp: <2012-01-13 12:01:11EST basis-splines.lisp>
;;
;; Copyright 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -25,7 +25,7 @@
;;; Should be subclass of interpolation?
(defmobject basis-spline "gsl_bspline"
((order sizet) (number-of-breakpoints sizet))
((order :sizet) (number-of-breakpoints :sizet))
"basis spline"
:gsl-version (1 9)
:documentation ; FDL
......@@ -79,26 +79,26 @@
(defmfun number-of-coefficients (bspline)
"gsl_bspline_ncoeffs"
(((mpointer bspline) :pointer))
:c-return sizet
:c-return :sizet
:gsl-version (1 9))
(defmfun order ((bspline basis-spline))
"gsl_bspline_order"
(((mpointer bspline) :pointer))
:definition :method
:c-return sizet
:c-return :sizet
:gsl-version (1 9))
(defmfun number-of-breakpoints (bspline)
"gsl_bspline_nbreak"
(((mpointer bspline) :pointer))
:c-return sizet
:c-return :sizet
:gsl-version (1 9)
:documentation "The number of breakpoints of the basis spline bspline.")
(defmfun breakpoint (i bspline)
"gsl_bspline_breakpoint"
((i sizet) ((mpointer bspline) :pointer))
((i :sizet) ((mpointer bspline) :pointer))
:c-return :double
:gsl-version (1 9)
:documentation "The ith breakpoint of the basis spline bspline.")
......
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy 2009-06-06 09:32:30EDT monte-carlo-structs.lisp
;; Time-stamp: <2010-05-23 11:36:42EDT monte-carlo-structs.lisp>
;; Time-stamp: <2012-01-13 12:01:40EST monte-carlo-structs.lisp>
;;
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -31,18 +31,18 @@
(include "gsl/gsl_monte_plain.h")
(cstruct plain-state "gsl_monte_plain_state"
(dim "dim" :type sizet)
(dim "dim" :type :sizet)
(x "x" :type :pointer))
(include "gsl/gsl_monte_miser.h")
(cstruct miser-state "gsl_monte_miser_state"
(min-calls "min_calls" :type sizet)
(min-calls-per-bisection "min_calls_per_bisection" :type sizet)
(min-calls "min_calls" :type :sizet)
(min-calls-per-bisection "min_calls_per_bisection" :type :sizet)
(dither "dither" :type :double)
(estimate-frac "estimate_frac" :type :double)
(alpha "alpha" :type :double)
(dim "dim" :type sizet)
(dim "dim" :type :sizet)
(estimate-style "estimate_style" :type :int)
(depth "depth" :type :int)
(verbose "verbose" :type :int)
......@@ -65,8 +65,8 @@
(cstruct vegas-state "gsl_monte_vegas_state"
;; grid
(dim "dim" :type sizet)
(bins-max "bins_max" :type sizet)
(dim "dim" :type :sizet)
(bins-max "bins_max" :type :sizet)
(bins "bins" :type :uint) ; uint
(boxes "boxes" :type :uint) ; these are both counted along the axes
(xi "xi" :type :pointer)
......
;; Monte Carlo Integration
;; Liam Healy Sat Feb 3 2007 - 17:42
;; Time-stamp: <2011-10-30 10:01:57EDT monte-carlo.lisp>
;; Time-stamp: <2012-01-13 12:01:39EST monte-carlo.lisp>
;;
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -31,7 +31,7 @@
(defmobject monte-carlo-plain
"gsl_monte_plain"
((dim sizet))
((dim :sizet))
"plain Monte Carlo integration"
:documentation ; FDL
"Make and initialize a workspace for Monte Carlo integration in dimension dim."
......@@ -52,7 +52,7 @@
"gsl_monte_plain_integrate"
((callback :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((dim0 lower-limits) :sizet) (number-of-samples :sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
......@@ -83,7 +83,7 @@
(defmobject monte-carlo-miser
"gsl_monte_miser"
((dim sizet))
((dim :sizet))
"miser Monte Carlo integration"
:documentation ; FDL
"Make and initialize a workspace for Monte Carlo integration in
......@@ -113,7 +113,7 @@
"gsl_monte_miser_integrate"
((callback :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((dim0 lower-limits) :sizet) (number-of-samples :sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
......@@ -144,7 +144,7 @@
(defmobject monte-carlo-vegas
"gsl_monte_vegas"
((dim sizet))
((dim :sizet))
"vegas Monte Carlo integration"
:documentation ; FDL
"Make and initialize a workspace for Monte Carlo integration in
......@@ -174,7 +174,7 @@
"gsl_monte_vegas_integrate"
((callback :pointer)
((grid:foreign-pointer lower-limits) :pointer) ((grid:foreign-pointer upper-limits) :pointer)
((dim0 lower-limits) sizet) (number-of-samples sizet)
((dim0 lower-limits) :sizet) (number-of-samples :sizet)
((mpointer generator) :pointer)
((mpointer state) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
......
;; Numerical integration techniques that require tables
;; Liam Healy 2009-04-04 15:24:05EDT
;; Time-stamp: <2011-10-30 10:27:27EDT numerical-integration-with-tables.lisp>
;; Time-stamp: <2012-01-13 12:01:39EST numerical-integration-with-tables.lisp>
;;
;; Copyright 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -62,7 +62,7 @@
(a :double) (b :double)
((mpointer table) :pointer)
(absolute-error :double) (relative-error :double)
(limit sizet) ((mpointer workspace) :pointer)
(limit :sizet) ((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
(callback (:struct fnstruct) nil (function :double (:input :double) :slug))
......@@ -86,7 +86,7 @@
(defmobject qawo-table
"gsl_integration_qawo_table"
((omega :double) (L :double) (trig integrate-sine-cosine) (n sizet))
((omega :double) (L :double) (trig integrate-sine-cosine) (n :sizet))
"table for QAWO numerical integration method"
:documentation ; FDL
"Make a table describing a sine or cosine weight function W(x) with
......@@ -119,7 +119,7 @@
((callback :pointer)
(a :double)
(absolute-error :double) (relative-error :double)
(limit sizet) ((mpointer workspace) :pointer)
(limit :sizet) ((mpointer workspace) :pointer)
((mpointer table) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......@@ -162,7 +162,7 @@
((callback :pointer)
(a :double)
(absolute-error :double)
(limit sizet)
(limit :sizet)
((mpointer workspace) :pointer) ((mpointer cycle-workspace) :pointer)
((mpointer table) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
......
;; Numerical integration
;; Liam Healy, Wed Jul 5 2006 - 23:14
;; Time-stamp: <2011-10-30 10:01:11EDT numerical-integration.lisp>
;; Time-stamp: <2012-01-13 12:01:38EST numerical-integration.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -50,7 +50,7 @@
(a :double) (b :double)
(absolute-error :double) (relative-error :double)
(result (:pointer :double)) (abserr (:pointer :double))
(neval (:pointer sizet)))
(neval (:pointer :sizet)))
:callbacks
(callback (:struct fnstruct) nil (function :double (:input :double) :slug))
:callback-dynamic (nil (function))
......@@ -70,7 +70,7 @@
;;;;****************************************************************************
(defmobject integration-workspace
"gsl_integration_workspace" ((size sizet))
"gsl_integration_workspace" ((size :sizet))
"integration workspace"
:documentation ; FDL
"Make a workspace sufficient to hold n double
......@@ -89,7 +89,7 @@
((callback :pointer)
(a :double) (b :double)
(absolute-error :double) (relative-error :double)
(limit sizet) (method integrate-method) ((mpointer workspace) :pointer)
(limit :sizet) (method integrate-method) ((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
(callback (:struct fnstruct) nil (function :double (:input :double) :slug))
......@@ -125,7 +125,7 @@
"gsl_integration_qags"
((callback :pointer)
(a :double) (b :double)
(absolute-error :double) (relative-error :double) (limit sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......@@ -157,8 +157,8 @@
(limit 1000) (workspace (make-integration-workspace limit)))
"gsl_integration_qagp"
((callback :pointer)
((grid:foreign-pointer points) :pointer) ((dim0 points) sizet)
(absolute-error :double) (relative-error :double) (limit sizet)
((grid:foreign-pointer points) :pointer) ((dim0 points) :sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:inputs (points)
......@@ -189,7 +189,7 @@
(limit 1000) (workspace (make-integration-workspace limit)))
"gsl_integration_qagi"
((callback :pointer)
(absolute-error :double) (relative-error :double) (limit sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......@@ -214,7 +214,7 @@
(limit 1000) (workspace (make-integration-workspace limit)))
"gsl_integration_qagiu"
((callback :pointer) (a :double)
(absolute-error :double) (relative-error :double) (limit sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......@@ -235,7 +235,7 @@
(limit 1000) (workspace (make-integration-workspace limit)))
"gsl_integration_qagil"
((callback :pointer) (b :double)
(absolute-error :double) (relative-error :double) (limit sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......@@ -261,7 +261,7 @@
"gsl_integration_qawc"
((callback :pointer)
(a :double) (b :double) (c :double)
(absolute-error :double) (relative-error :double) (limit sizet)
(absolute-error :double) (relative-error :double) (limit :sizet)
((mpointer workspace) :pointer)
(result (:pointer :double)) (abserr (:pointer :double)))
:callbacks
......
;; Chebyshev Approximations
;; Liam Healy Sat Nov 17 2007 - 20:36
;; Time-stamp: <2011-10-30 10:25:39EDT chebyshev.lisp>
;; Time-stamp: <2012-01-13 12:01:09EST chebyshev.lisp>
;;
;; Copyright 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -27,7 +27,7 @@
;;;;****************************************************************************
(defmobject chebyshev "gsl_cheb"
((order sizet))
((order :sizet))
"Chebyshev series"
:documentation ; FDL
"Make a Chebyshev series of specified order."
......@@ -43,7 +43,7 @@
(((mpointer object) :pointer))
:definition :method
:documentation "The order of Chebyshev series."
:c-return sizet
:c-return :sizet
:gsl-version (1 12))
(defmfun size ((chebyshev chebyshev))
......@@ -51,7 +51,7 @@
(((mpointer chebyshev) :pointer))
:definition :method
:documentation "The length of the Chebyshev coefficient array."
:c-return sizet
:c-return :sizet
:gsl-version (1 12))
(defmfun coefficients (chebyshev)
......@@ -75,7 +75,7 @@
(defmfun evaluate ((object chebyshev) x &key order)
("gsl_cheb_eval" "gsl_cheb_eval_n")
((((mpointer object) :pointer) (x :double))
(((mpointer object) :pointer) (order sizet) (x :double)))
(((mpointer object) :pointer) (order :sizet) (x :double)))
:definition :method
:callback-object object
:c-return :double
......@@ -87,7 +87,7 @@
("gsl_cheb_eval_err" "gsl_cheb_eval_n_err")
((((mpointer chebyshev) :pointer) (x :double)
(result (:pointer :double)) (abserr (:pointer :double)))
(((mpointer chebyshev) :pointer) (order sizet) (x :double)
(((mpointer chebyshev) :pointer) (order :sizet) (x :double)
(result (:pointer :double)) (abserr (:pointer :double))))
:documentation ; FDL
"Evaluate the Chebyshev series at a point x, returning result and
......
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy 2009-06-06 09:36:29EDT array-structs.lisp
;; Time-stamp: <2010-07-18 22:52:48EDT array-structs.lisp>
;; Time-stamp: <2012-01-13 12:01:37EST array-structs.lisp>
;;
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -31,14 +31,14 @@
(include "gsl/gsl_block_double.h")
(cstruct gsl-block-c "gsl_block"
(size "size" :type sizet)
(size "size" :type :sizet)
(data "data" :type :pointer))
(include "gsl/gsl_vector_double.h")
(cstruct gsl-vector-c "gsl_vector"
(size "size" :type sizet)
(stride "stride" :type sizet)
(size "size" :type :sizet)
(stride "stride" :type :sizet)
(data "data" :type :pointer)
(block "block" :type :pointer)
(owner "owner" :type :int))
......@@ -46,9 +46,9 @@
(include "gsl/gsl_matrix_double.h")
(cstruct gsl-matrix-c "gsl_matrix"
(size0 "size1" :type sizet)
(size1 "size2" :type sizet)
(tda "tda" :type sizet)
(size0 "size1" :type :sizet)
(size1 "size2" :type :sizet)
(tda "tda" :type :sizet)
(data "data" :type :pointer)
(block "block" :type :pointer)
(owner "owner" :type :int))
......@@ -56,12 +56,12 @@
(include "gsl/gsl_permutation.h")
(cstruct gsl-permutation-c "gsl_permutation"
(size "size" :type sizet)
(size "size" :type :sizet)
(data "data" :type :pointer))
(include "gsl/gsl_combination.h")
(cstruct gsl-combination-c "gsl_combination"
(range "n" :type sizet)
(size "k" :type sizet)
(range "n" :type :sizet)
(size "k" :type :sizet)
(data "data" :type :pointer))
;; Functions for both vectors and matrices.
;; Liam Healy 2008-04-26 20:48:44EDT both.lisp
;; Time-stamp: <2011-05-26 12:37:36EDT both.lisp>
;; Time-stamp: <2012-01-13 12:01:36EST both.lisp>
;;
;; Copyright 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -27,9 +27,9 @@
(defmfun alloc-from-block ((object vector) blockptr)
("gsl_" :category :type "_alloc_from_block")
((blockptr :pointer)
(0 sizet) ; offset
((size object) sizet) ; number of elements
(1 sizet)) ; stride
(0 :sizet) ; offset
((size object) :sizet) ; number of elements
(1 :sizet)) ; stride
:definition :generic
:c-return :pointer
:export nil
......@@ -38,10 +38,10 @@
(defmfun alloc-from-block ((object grid:matrix) blockptr)
("gsl_" :category :type "_alloc_from_block")
((blockptr :pointer)
(0 sizet) ; offset
((first (grid:dimensions object)) sizet) ; number of rows
((second (grid:dimensions object)) sizet) ; number of columns
((second (grid:dimensions object)) sizet)) ; "tda" = number of columns for now
(0 :sizet) ; offset
((first (grid:dimensions object)) :sizet) ; number of rows
((second (grid:dimensions object)) :sizet) ; number of columns
((second (grid:dimensions object)) :sizet)) ; "tda" = number of columns for now
:definition :methods
:c-return :pointer
:export nil)
......@@ -100,9 +100,9 @@
"Create a form to access the GSL array value from the mpointer. If value is not nil,
set the value; otherwise, get the value."
;; (access-value-int 'ptr 'grid:vector-unsigned-byte-16 45 '(3))
;; (FOREIGN-FUNCALL "gsl_vector_ushort_set" :POINTER PTR SIZET 3 :UNSIGNED-SHORT 45 :VOID)
;; (FOREIGN-FUNCALL "gsl_vector_ushort_set" :POINTER PTR :SIZET 3 :UNSIGNED-SHORT 45 :VOID)
;; (access-value-int 'ptr 'grid:matrix-unsigned-byte-16 nil '(45 3))
;; (FOREIGN-FUNCALL "gsl_matrix_ushort_get" :POINTER PTR SIZET 45 SIZET 3 :UNSIGNED-SHORT)
;; (FOREIGN-FUNCALL "gsl_matrix_ushort_get" :POINTER PTR :SIZET 45 :SIZET 3 :UNSIGNED-SHORT)
(let ((element-type (grid::farray-element-type class-name))
(matrixp (subtypep class-name 'grid:matrix)))
(unless (or (and matrixp (eql 2 (length indices)))
......@@ -116,8 +116,8 @@
(if matrixp 'grid:matrix 'vector)
element-type)
:pointer ,mpointer
sizet ,(first indices)
,@(when matrixp (list 'sizet (second indices)))
:sizet ,(first indices)
,@(when matrixp (list ':sizet (second indices)))
,(grid:cl-cffi element-type)
,@(when value `(,value :void)))))
......@@ -324,14 +324,14 @@
:definition :generic
:element-types :no-complex
:inputs (a)
:c-return sizet
:c-return :sizet
:documentation ; FDL
"The index of the minimum value in a. When there are several
equal minimum elements, then the lowest index is returned.")
(defmfun min-index ((a grid:matrix))
("gsl_" :category :type "_min_index")
(((mpointer a) :pointer) (imin (:pointer sizet)) (jmin (:pointer sizet)))
(((mpointer a) :pointer) (imin (:pointer :sizet)) (jmin (:pointer :sizet)))
:definition :methods
:element-types :no-complex
:inputs (a)
......@@ -343,14 +343,14 @@
:definition :generic
:element-types :no-complex
:inputs (a)
:c-return sizet
:c-return :sizet
:documentation ; FDL
"The index of the maximum value in a. When there are several
equal maximum elements, then the lowest index is returned.")
(defmfun max-index ((a grid:matrix))
("gsl_" :category :type "_max_index")
(((mpointer a) :pointer) (imin (:pointer sizet)) (jmin (:pointer sizet)))
(((mpointer a) :pointer) (imin (:pointer :sizet)) (jmin (:pointer :sizet)))
:definition :methods
:element-types :no-complex
:inputs (a)
......@@ -358,7 +358,7 @@
(defmfun minmax-index ((a vector))
("gsl_" :category :type "_minmax_index")
(((mpointer a) :pointer) (imin (:pointer sizet)) (jmin (:pointer sizet)))
(((mpointer a) :pointer) (imin (:pointer :sizet)) (jmin (:pointer :sizet)))
:definition :generic
:element-types :no-complex
:inputs (a)
......@@ -372,8 +372,8 @@
(defmfun minmax-index ((a grid:matrix))
("gsl_" :category :type "_minmax_index")
(((mpointer a) :pointer)
(imin (:pointer sizet)) (jmin (:pointer sizet))
(imax (:pointer sizet)) (jmax (:pointer sizet)))
(imin (:pointer :sizet)) (jmin (:pointer :sizet))
(imax (:pointer :sizet)) (jmax (:pointer :sizet)))
:definition :methods
:element-types :no-complex
:inputs (a)
......
;; Combinations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2011-01-10 18:16:28EST combination.lisp>
;; Time-stamp: <2012-01-13 12:01:36EST combination.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -123,7 +123,7 @@
(defmfun combination-range (c)
"gsl_combination_n"
(((mpointer c) :pointer))
:c-return sizet
:c-return :sizet
:inputs (c)
:documentation ; FDL
"The range (n), or maximum possible value (n in the (n k) notation)
......@@ -133,7 +133,7 @@
"gsl_combination_k"
(((mpointer c) :pointer))
:definition :method
:c-return sizet
:c-return :sizet
:documentation ; FDL
"The number of elements (k) in the combination c.")
......
;; Matrices
;; Liam Healy 2008-04-15 21:57:52EDT matrix.lisp
;; Time-stamp: <2011-01-12 00:34:45EST matrix.lisp>
;; Time-stamp: <2012-01-13 12:01:35EST matrix.lisp>
;;
;; Copyright 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -46,7 +46,7 @@
(defmfun row ((matrix grid:matrix) i
&optional (vector (grid:make-foreign-array element-type :dimensions (dim1 matrix))))
("gsl_matrix" :type "_get_row")
(((mpointer vector) :pointer) ((mpointer matrix) :pointer) (i sizet))
(((mpointer vector) :pointer) ((mpointer matrix) :pointer) (i :sizet))
:definition :generic
:inputs (matrix)
:outputs (vector)
......@@ -58,7 +58,7 @@
(defmfun (setf row) ((vector vector) (matrix grid:matrix) i)
("gsl_matrix" :type "_set_row")
(((mpointer matrix) :pointer) (i sizet) ((mpointer vector) :pointer))
(((mpointer matrix) :pointer) (i :sizet) ((mpointer vector) :pointer))
:definition :generic
:inputs (vector matrix)
:outputs (matrix)
......@@ -70,7 +70,7 @@
(defmfun column ((matrix grid:matrix) i
&optional (vector (grid:make-foreign-array element-type :dimensions (dim0 matrix))))
("gsl_matrix" :type "_get_col")
(((mpointer vector) :pointer) ((mpointer matrix) :pointer) (i sizet))
(((mpointer vector) :pointer) ((mpointer matrix) :pointer) (i :sizet))
:definition :generic
:inputs (matrix)
:outputs (vector)
......@@ -82,7 +82,7 @@
(defmfun (setf column) ((vector vector) (matrix grid:matrix) i)
("gsl_matrix" :type "_set_col")
(((mpointer matrix) :pointer) (i sizet) ((mpointer vector) :pointer))
(((mpointer matrix) :pointer) (i :sizet) ((mpointer vector) :pointer))
:definition :generic
:inputs (vector matrix)
:outputs (matrix)
......@@ -97,7 +97,7 @@
(defmfun swap-rows ((matrix grid:matrix) i j)
("gsl_matrix" :type "_swap_rows")
(((mpointer matrix) :pointer) (i sizet) (j sizet))
(((mpointer matrix) :pointer) (i :sizet) (j :sizet))
:definition :generic
:return (matrix)
:inputs (matrix)
......@@ -107,7 +107,7 @@
(defmfun swap-columns ((matrix grid:matrix) i j)
("gsl_matrix" :type "_swap_columns")
(((mpointer matrix) :pointer) (i sizet) (j sizet))
(((mpointer matrix) :pointer) (i :sizet) (j :sizet))
:definition :generic
:return (matrix)
:inputs (matrix)
......@@ -117,7 +117,7 @@
(defmfun swap-row-column ((matrix grid:matrix) i j)
("gsl_matrix" :type "_swap_rowcol")
(((mpointer matrix) :pointer) (i sizet) (j sizet))
(((mpointer matrix) :pointer) (i :sizet) (j :sizet))
:definition :generic
:return (matrix)
:inputs (matrix)
......
;; Permutations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2011-05-26 12:37:36EDT permutation.lisp>
;; Time-stamp: <2012-01-13 12:01:35EST permutation.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -101,7 +101,7 @@
(defmfun swap-elements ((p permutation) i j)
"gsl_permutation_swap"
(((mpointer p) :pointer) (i sizet) (j sizet))
(((mpointer p) :pointer) (i :sizet) (j :sizet))
:definition :method
:inputs (p)
:outputs (p)
......@@ -117,7 +117,7 @@
"gsl_permutation_size"
(((mpointer p) :pointer))
:definition :method
:c-return sizet
:c-return :sizet
:inputs (p)
:documentation ; FDL
"The size of the permutation p.")
......@@ -220,7 +220,7 @@
(defmfun permute
(p (data #.grid:+foreign-pointer-class+) &optional (size 1) (stride 1))
"gsl_permute"
(((mpointer p) :pointer) (data :pointer) (stride sizet) (size sizet))
(((mpointer p) :pointer) (data :pointer) (stride :sizet) (size :sizet))
:definition :method
:inputs (p data)
:outputs (data)
......@@ -248,7 +248,7 @@
(defmfun permute-inverse
(p (data #.grid:+foreign-pointer-class+) &optional (size 1) (stride 1))
"gsl_permute_inverse"
(((mpointer p) :pointer) (data :pointer) (stride sizet) (stride sizet))
(((mpointer p) :pointer) (data :pointer) (stride :sizet) (stride :sizet))
:definition :method
:inputs (p data)
:outputs (data)
......@@ -294,7 +294,7 @@
(defmfun inversions (p)
"gsl_permutation_inversions" (((mpointer p) :pointer))
:c-return sizet
:c-return :sizet
:inputs (p)
:documentation ; FDL
"Count the number of inversions in the permutation
......@@ -305,7 +305,7 @@
(defmfun linear-cycles (p)
"gsl_permutation_linear_cycles" (((mpointer p) :pointer))
:c-return sizet
:c-return :sizet
:inputs (p)
:documentation ; FDL
"Count the number of cycles in the permutation p, given in linear form.")
......@@ -313,7 +313,7 @@
(defmfun canonical-cycles (p)
"gsl_permutation_canonical_cycles"
(((mpointer p) :pointer))
:c-return sizet
:c-return :sizet
:inputs (p)
:documentation ; FDL
"Count the number of cycles in the permutation q, given in canonical form.")
......
;; Vectors
;; Liam Healy 2008-04-13 09:39:02EDT vector.lisp
;; Time-stamp: <2010-06-28 11:03:32EDT vector.lisp>
;; Time-stamp: <2012-01-13 12:01:37EST vector.lisp>
;;
;; Copyright 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -28,7 +28,7 @@
(defmfun set-basis ((object vector) index)
("gsl_" :category :type "_set_basis")
(((mpointer object) :pointer) (index sizet))
(((mpointer object) :pointer) (index :sizet))
:definition :generic
:inputs (object)
:outputs (object)
......@@ -39,7 +39,7 @@
(defmfun swap-elements ((vec vector) i j)
("gsl_" :category :type "_swap_elements")
(((mpointer vec) :pointer) (i sizet) (j sizet))
(((mpointer vec) :pointer) (i :sizet) (j :sizet))
:definition :generic
:inputs (vec)
:outputs (vec)
......
;; CFFI-Grovel definitions.
;; Liam Healy
;; Time-stamp: <2010-05-23 11:36:31EDT eigen-struct.lisp>
;; Time-stamp: <2012-01-13 12:01:34EST eigen-struct.lisp>
;;
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -31,4 +31,4 @@
(include "gsl/gsl_eigen.h")
(cstruct gsl-nonsymm-ws "gsl_eigen_nonsymm_workspace"
(n-evals "n_evals" :type sizet)) ; number of eigenvalues found
(n-evals "n_evals" :type :sizet)) ; number of eigenvalues found
;; Real generalized eigensystems
;; Liam Healy 2009-02-16 12:55:04EST real-generalized.lisp
;; Time-stamp: <2011-01-12 00:08:22EST generalized.lisp>
;; Time-stamp: <2012-01-13 12:01:34EST generalized.lisp>
;;
;; Copyright 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -21,7 +21,7 @@
(in-package :gsl)
(defmobject eigen-gensymm
"gsl_eigen_gensymm" ((n sizet))
"gsl_eigen_gensymm" ((n :sizet))
"symmetric generalized eigenvalue workspace"
:gsl-version (1 10)
:documentation ; FDL
......@@ -30,7 +30,7 @@
is O(2n).")
(defmobject eigen-gensymmv
"gsl_eigen_gensymmv" ((n sizet))
"gsl_eigen_gensymmv" ((n :sizet))
"symmetric generalized eigensystem workspace"
:gsl-version (1 10)