Commit 533b2126 authored by Liam Healy's avatar Liam Healy

Fix histogram etc. missed changes

Missed #'mpointer changes and some renames; also change to new args
for maref.
parent 3cf4781e
;; The histogram structure
;; Liam Healy, Mon Jan 1 2007 - 11:32
;; Time-stamp: <2008-08-17 09:02:00EDT histogram.lisp>
;; Time-stamp: <2008-08-23 19:08:15EDT histogram.lisp>
;; $Id$
(in-package :gsl)
......@@ -58,14 +58,14 @@
(defmfun free-histo-1 (object)
"gsl_histogram_free"
(((pointer object) :pointer))
(((mpointer object) :pointer))
:c-return :void
:export nil
:index (letm histogram))
(defmfun free-histo-2 (object)
"gsl_histogram2d_free"
(((pointer object) :pointer))
(((mpointer object) :pointer))
:c-return :void
:export nil
:index (letm histogram))
......@@ -77,7 +77,7 @@
;;; C function means; assumed to be error code.
(defmfun set-ranges-1 (histogram ranges)
"gsl_histogram_set_ranges"
(((pointer histogram) :pointer)
(((mpointer histogram) :pointer)
((c-pointer ranges) :pointer) ((dim0 ranges) sizet))
:export nil
:index (letm histogram)
......@@ -90,7 +90,7 @@
(defmfun set-ranges-2 (histogram x-ranges y-ranges)
"gsl_histogram2d_set_ranges"
(((pointer histogram) :pointer)
(((mpointer histogram) :pointer)
((c-pointer x-ranges) :pointer) ((dim0 x-ranges) sizet)
((c-pointer y-ranges) :pointer) ((dim0 y-ranges) sizet))
:export nil
......@@ -112,7 +112,7 @@
;;; C function means; assumed to be error code.
(defmfun set-ranges-uniform-1 (histogram minimum maximum)
"gsl_histogram_set_ranges_uniform"
(((pointer histogram) :pointer) (minimum :double) (maximum :double))
(((mpointer histogram) :pointer) (minimum :double) (maximum :double))
:export nil
:index set-ranges-uniform
:documentation ; FDL
......@@ -131,7 +131,7 @@
(defmfun set-ranges-uniform-2
(histogram x-minimum x-maximum y-minimum y-maximum)
"gsl_histogram2d_set_ranges_uniform"
(((pointer histogram) :pointer)
(((mpointer histogram) :pointer)
(x-minimum :double) (x-maximum :double)
(y-minimum :double) (y-maximum :double))
:export nil
......@@ -156,7 +156,7 @@
(defmfun copy-1 (destination source)
"gsl_histogram_memcpy"
(((pointer destination) :pointer) ((pointer source) :pointer))
(((mpointer destination) :pointer) ((mpointer source) :pointer))
:export nil
:index copy
:documentation ; FDL
......@@ -167,7 +167,7 @@
(defmfun copy-2 (destination source)
"gsl_histogram2d_memcpy"
(((pointer destination) :pointer) ((pointer source) :pointer))
(((mpointer destination) :pointer) ((mpointer source) :pointer))
:export nil
:index copy)
......@@ -176,7 +176,7 @@
(defmfun clone-1 (source)
"gsl_histogram_memcpy"
(((pointer source) :pointer))
(((mpointer source) :pointer))
:export nil
:index clone
:documentation ; FDL
......@@ -185,7 +185,7 @@
(defmfun clone-2 (source)
"gsl_histogram2d_memcpy"
(((pointer source) :pointer))
(((mpointer source) :pointer))
:export nil
:index clone
:documentation ; FDL
......@@ -205,6 +205,6 @@
(let ((ret
(make-instance 'histogram :number-of-bins size
:pointer (when from (clone from)))))
(unless (pointer ret)
(unless (mpointer ret)
(alloc ret))
ret))
;; Statistics of histograms.
;; Liam Healy, Mon Jan 1 2007 - 16:13
;; Time-stamp: <2008-08-17 09:41:27EDT statistics.lisp>
;; Time-stamp: <2008-08-23 19:42:07EDT statistics.lisp>
;; $Id$
(in-package :gsl)
(defmfun mmax-1 (histogram)
"gsl_histogram_max_val"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mmax
......@@ -16,20 +16,20 @@
(defmfun mmax-2 (histogram)
"gsl_histogram2d_max_val"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mmax
:documentation ; FDL
"The maximum value contained in the histogram bins.")
(defmethod gsl-max ((histogram histogram))
(defmethod mmax ((histogram histogram))
"The maximum value contained in the histogram bins."
(histo-1d2d histogram mmax))
(defmfun mmin-1 (histogram)
"gsl_histogram_min_val"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mmin
......@@ -38,20 +38,20 @@
(defmfun mmin-2 (histogram)
"gsl_histogram2d_min_val"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mmin
:documentation ; FDL
"The minimum value contained in the histogram bins.")
(defmethod gsl-min ((histogram histogram)) ; FDL
(defmethod mmin ((histogram histogram)) ; FDL
"The minimum value contained in the histogram bins."
(histo-1d2d histogram mmin))
(defmfun max-index-1 (histogram)
"gsl_histogram_max_bin"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return sizet
:export nil
:index max-index
......@@ -62,9 +62,9 @@
(defmfun max-index-2 (histogram)
"gsl_histogram2d_max_bin"
(((pointer histogram) :pointer)
(((mpointer histogram) :pointer)
(xindex sizet) (yindex sizet))
:c-return sizet
:c-return :void
:export nil
:index max-index
:documentation ; FDL
......@@ -72,12 +72,12 @@
where several bins contain the same maximum value the first bin
found is returned.")
(defmethod gsl-max-index (histogram)
(histo-1d2d histogram gsl-max-index))
(defmethod max-index ((histogram histogram))
(histo-1d2d histogram max-index))
(defmfun min-index-1 (histogram)
"gsl_histogram_min_bin"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return sizet
:export nil
:index min-index
......@@ -88,9 +88,9 @@
(defmfun min-index-2 (histogram)
"gsl_histogram2d_min_bin"
(((pointer histogram) :pointer)
(((mpointer histogram) :pointer)
(xindex sizet) (yindex sizet))
:c-return sizet
:c-return :void
:export nil
:index min-index
:documentation ; FDL
......@@ -98,12 +98,12 @@
where several bins contain the same minimum value the first bin
found is returned.")
(defmethod min-index (histogram)
(defmethod min-index ((histogram histogram))
(histo-1d2d histogram min-index))
(defmfun mean-1 (histogram)
"gsl_histogram_mean"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mean
......@@ -115,7 +115,7 @@
(defmfun mean-2x (histogram)
"gsl_histogram2d_xmean"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mean
......@@ -126,7 +126,7 @@
(defmfun mean-2y (histogram)
"gsl_histogram2d_ymean"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index mean
......@@ -146,7 +146,7 @@
(defmfun sigma-1 (histogram)
"gsl_histogram_sigma"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index sigma
......@@ -159,14 +159,14 @@
(defmfun sigma-2x (histogram)
"gsl_histogram2d_xsigma"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index sigma)
(defmfun sigma-2y (histogram)
"gsl_histogram2d_ysigma"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index sigma)
......@@ -185,7 +185,7 @@
(defmfun histogram-covariance (histogram-2d)
"gsl_histogram2d_cov"
(((pointer histogram-2d) :pointer))
(((mpointer histogram-2d) :pointer))
:c-return :double
:documentation ; FDL
"The covariance of the histogrammed x and y variables, where
......@@ -195,7 +195,7 @@
(defmfun sum-1 (histogram)
"gsl_histogram_sum"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index sum
......@@ -205,7 +205,7 @@
(defmfun sum-2 (histogram)
"gsl_histogram2d_sum"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:export nil
:index sum
......
;; Updating and accessing histogram elements.
;; Liam Healy, Mon Jan 1 2007 - 14:43
;; Time-stamp: <2008-08-17 09:41:04EDT updating-accessing.lisp>
;; Time-stamp: <2008-08-23 19:08:14EDT updating-accessing.lisp>
;; $Id$
(in-package :gsl)
......@@ -24,9 +24,9 @@
histograms for a small range of a larger dataset, ignoring the values
outside the range of interest.")
(defmfun maref ((histogram histogram) &rest i)
(defmfun maref ((histogram histogram) i &optional i2)
"gsl_histogram_get"
(((pointer histogram) :pointer) ((first i) sizet))
(((mpointer histogram) :pointer) ((first i) sizet))
:definition :method
:c-return :double
:documentation ; FDL
......@@ -36,7 +36,7 @@
(defmfun range (histogram i)
"gsl_histogram_get_range"
(((pointer histogram) :pointer) (i sizet)
(((mpointer histogram) :pointer) (i sizet)
(lower :double) (upper :double))
:documentation ; FDL
"Find the upper and lower range limits of the i-th
......@@ -51,28 +51,28 @@
(defmfun max-range (histogram)
"gsl_histogram_max"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:documentation ; FDL
"The maximum upper range limit of the histogram.")
(defmfun min-range (histogram)
"gsl_histogram_min"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :double
:documentation ; FDL
"The minimum lower range limit of the histogram.")
(defmfun bins (histogram)
"gsl_histogram_bins"
(((pointer histogram) :pointer))
:c-return :int
(((mpointer histogram) :pointer))
:c-return sizet
:documentation ; FDL
"The number of bins in the histogram.")
(defmfun reset (histogram)
"gsl_histogram_reset"
(((pointer histogram) :pointer))
(((mpointer histogram) :pointer))
:c-return :void
:documentation ; FDL
"Reset all the bins in the histogram to zero.")
......
;; Generators of random numbers.
;; Liam Healy, Sat Jul 15 2006 - 14:43
;; Time-stamp: <2008-08-16 20:15:24EDT generators.lisp>
;; Time-stamp: <2008-08-23 19:17:26EDT generators.lisp>
;; $Id$
(in-package :gsl)
......@@ -233,18 +233,6 @@
:c-return :pointer
:definition :method)
(defmfun write-binary
((object random-number-generator) stream)
"gsl_rng_fwrite"
((stream :pointer) ((generator object) :pointer))
:definition :method)
(defmfun read-binary
((object random-number-generator) stream)
"gsl_block_fread"
((stream :pointer) ((pointer object) :pointer))
:definition :method)
;;;;****************************************************************************
;;;; Examples and unit test
;;;;****************************************************************************
......
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