From e88a55936d168048e3251c3a4c9fc143d5864619 Mon Sep 17 00:00:00 2001
From: Liam Healy <liam@thinkpad.local>
Date: Fri, 26 Dec 2008 20:03:13 -0500
Subject: [PATCH] New function #'mpointer replaces #'generator

New function #'mpointer replaces #'generator for random functions.
---
 init/mobject.lisp              |  4 ++--
 monte-carlo.lisp               |  6 +++---
 random/beta.lisp               |  4 ++--
 random/binomial.lisp           |  6 ++++--
 random/cauchy.lisp             |  7 +++++--
 random/chi-squared.lisp        |  7 +++++--
 random/dirichlet.lisp          |  6 ++++--
 random/exponential-power.lisp  |  6 ++++--
 random/exponential.lisp        |  7 +++++--
 random/fdist.lisp              |  7 +++++--
 random/flat.lisp               |  6 ++++--
 random/gamma.lisp              |  9 ++++++---
 random/gaussian-bivariate.lisp |  6 ++++--
 random/gaussian-tail.lisp      |  8 +++++---
 random/gaussian.lisp           | 15 +++++++++------
 random/geometric.lisp          |  6 ++++--
 random/gumbel1.lisp            |  7 +++++--
 random/gumbel2.lisp            |  7 +++++--
 random/hypergeometric.lisp     |  7 +++++--
 random/landau.lisp             |  6 ++++--
 random/laplace.lisp            |  7 +++++--
 random/levy.lisp               |  8 +++++---
 random/logarithmic.lisp        |  6 ++++--
 random/logistic.lisp           |  7 +++++--
 random/multinomial.lisp        |  6 ++++--
 random/negative-binomial.lisp  |  8 +++++---
 random/pareto.lisp             |  7 +++++--
 random/poisson.lisp            |  7 +++++--
 random/rayleigh-tail.lisp      |  6 ++++--
 random/rayleigh.lisp           |  6 ++++--
 random/shuffling-sampling.lisp |  8 ++++----
 random/spherical-vector.lisp   | 12 +++++++-----
 random/tdist.lisp              |  7 ++++---
 random/weibull.lisp            |  7 +++++--
 simulated-annealing.lisp       |  6 +++---
 35 files changed, 159 insertions(+), 86 deletions(-)

diff --git a/init/mobject.lisp b/init/mobject.lisp
index 22be2634..2b53d80e 100644
--- a/init/mobject.lisp
+++ b/init/mobject.lisp
@@ -1,6 +1,6 @@
 ;; Definition of GSL objects and ways to use them.
 ;; Liam Healy, Sun Dec  3 2006 - 10:21
-;; Time-stamp: <2008-12-26 18:13:24EST mobject.lisp>
+;; Time-stamp: <2008-12-26 19:16:05EST mobject.lisp>
 ;; $Id$
 
 ;;; GSL objects are represented in GSLL as and instance of a 'mobject.
@@ -13,7 +13,7 @@
 (in-package :gsl)
 
 (defclass mobject ()
-  ((mpointper :initarg :mpointer :reader mpointer
+  ((mpointer :initarg :mpointer :reader mpointer
 	     :documentation "A pointer to the GSL representation of the object.")))
 
 (defmacro defmobject
diff --git a/monte-carlo.lisp b/monte-carlo.lisp
index c1c5dd05..7cf3109c 100644
--- a/monte-carlo.lisp
+++ b/monte-carlo.lisp
@@ -1,6 +1,6 @@
 ;; Monte Carlo Integration
 ;; Liam Healy Sat Feb  3 2007 - 17:42
-;; Time-stamp: <2008-12-26 18:59:23EST monte-carlo.lisp>
+;; Time-stamp: <2008-12-26 19:34:42EST monte-carlo.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -106,7 +106,7 @@
   ((function :pointer)
    ((c-pointer lower-limits) :pointer) ((c-pointer upper-limits) :pointer)
    ((dim0 lower-limits) sizet) (calls sizet)
-   ((generator generator) :pointer)
+   ((mpointer generator) :pointer)
    ((mpointer state) :pointer)
    (result :double) (abserr :double))
   :inputs (lower-limits upper-limits)
@@ -190,7 +190,7 @@
   ((function :pointer)
    ((c-pointer lower-limits) :pointer) ((c-pointer upper-limits) :pointer)
    ((dim0 lower-limits) sizet) (calls sizet)
-   ((generator generator) :pointer)
+   ((mpointer generator) :pointer)
    ((mpointer state) :pointer)
    (result :double) (abserr :double))
   :inputs (lower-limits upper-limits)
diff --git a/random/beta.lisp b/random/beta.lisp
index 86fe5db0..feb738ce 100644
--- a/random/beta.lisp
+++ b/random/beta.lisp
@@ -1,6 +1,6 @@
 ;; Beta distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:46:07EST beta.lisp>
+;; Time-stamp: <2008-12-26 19:29:42EST beta.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -8,7 +8,7 @@
 (defmfun beta-rd (generator a b)
   ;; Named #'beta-rd to avoid confusion with the special function #'beta.
   "gsl_ran_beta"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the beta distribution.  The distribution function is
diff --git a/random/binomial.lisp b/random/binomial.lisp
index baf98d9d..ab44c25f 100644
--- a/random/binomial.lisp
+++ b/random/binomial.lisp
@@ -1,13 +1,15 @@
 ;; Binomial distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:38:56EST binomial.lisp>
+;; Time-stamp: <2008-12-26 19:34:39EST binomial.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun binomial (generator p n)
   "gsl_ran_binomial"
-  (((generator generator) :pointer) (p :double) (n :uint))
+  (((mpointer generator) :pointer) (p :double) (n :uint))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the binomial distribution,
diff --git a/random/cauchy.lisp b/random/cauchy.lisp
index 589fd4d4..5500c282 100644
--- a/random/cauchy.lisp
+++ b/random/cauchy.lisp
@@ -1,13 +1,16 @@
 ;; Cauchy distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:41:51EST cauchy.lisp>
+;; Time-stamp: <2008-12-26 19:40:10EST cauchy.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun cauchy (generator a)
   "gsl_ran_cauchy"
-  (((generator generator) :pointer) (a :double))
+  (((mpointer generator) :pointer) (a :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Cauchy distribution with
diff --git a/random/chi-squared.lisp b/random/chi-squared.lisp
index 3b3460ab..cb0a9af3 100644
--- a/random/chi-squared.lisp
+++ b/random/chi-squared.lisp
@@ -1,13 +1,16 @@
 ;; Chi-squared distribution
 ;; Liam Healy, Sat Oct  7 2006 - 16:13
-;; Time-stamp: <2008-12-26 11:45:06EST chi-squared.lisp>
+;; Time-stamp: <2008-12-26 19:47:17EST chi-squared.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun chi-squared (generator nu)
   "gsl_ran_chisq"
-  (((generator generator) :pointer) (nu :double))
+  (((mpointer generator) :pointer) (nu :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the chi-squared distribution
diff --git a/random/dirichlet.lisp b/random/dirichlet.lisp
index 55773d1d..4a10909e 100644
--- a/random/dirichlet.lisp
+++ b/random/dirichlet.lisp
@@ -1,13 +1,15 @@
 ;; Dirichlet distribution
 ;; Liam Healy, Sun Oct 29 2006
-;; Time-stamp: <2008-12-26 11:46:05EST dirichlet.lisp>
+;; Time-stamp: <2008-12-26 19:50:49EST dirichlet.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun dirichlet (generator alpha theta)
   "gsl_ran_dirichlet"
-  (((generator generator) :pointer)
+  (((mpointer generator) :pointer)
    ((dim0 alpha) sizet)
    ((c-pointer alpha) :pointer)
    ;; theta had better be at least as long as alpha, or they'll be trouble
diff --git a/random/exponential-power.lisp b/random/exponential-power.lisp
index d1ff2703..87e65c2c 100644
--- a/random/exponential-power.lisp
+++ b/random/exponential-power.lisp
@@ -1,13 +1,15 @@
 ;; Exponential power distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:41:54EST exponential-power.lisp>
+;; Time-stamp: <2008-12-26 19:36:20EST exponential-power.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun exponential-power (generator a b)
   "gsl_ran_exppow"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the exponential power distribution
diff --git a/random/exponential.lisp b/random/exponential.lisp
index e3384c93..d57318ac 100644
--- a/random/exponential.lisp
+++ b/random/exponential.lisp
@@ -1,13 +1,16 @@
 ;; Exponential distribution
 ;; Liam Healy, Sat Sep  2 2006 - 19:04
-;; Time-stamp: <2008-12-26 11:45:08EST exponential.lisp>
+;; Time-stamp: <2008-12-26 19:45:35EST exponential.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun exponential (generator mu)
   "gsl_ran_exponential"
-  (((generator generator) :pointer) (mu :double))
+  (((mpointer generator) :pointer) (mu :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the exponential distribution
diff --git a/random/fdist.lisp b/random/fdist.lisp
index 1d5604c5..bde8fb13 100644
--- a/random/fdist.lisp
+++ b/random/fdist.lisp
@@ -1,13 +1,16 @@
 ;; Fdist distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:45:12EST fdist.lisp>
+;; Time-stamp: <2008-12-26 19:39:09EST fdist.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun fdist (generator nu1 nu2)
   "gsl_ran_fdist"
-  (((generator generator) :pointer) (nu1 :double) (nu2 :double))
+  (((mpointer generator) :pointer) (nu1 :double) (nu2 :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the F-distribution with degrees of freedom nu1
diff --git a/random/flat.lisp b/random/flat.lisp
index dad5bc3b..7b224900 100644
--- a/random/flat.lisp
+++ b/random/flat.lisp
@@ -1,13 +1,15 @@
 ;; Flat distribution
 ;; Liam Healy, Oct  7 2006
-;; Time-stamp: <2008-12-26 11:38:55EST flat.lisp>
+;; Time-stamp: <2008-12-26 19:36:22EST flat.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun flat (generator a b)
   "gsl_ran_flat"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the flat (uniform)
diff --git a/random/gamma.lisp b/random/gamma.lisp
index 602e7e89..ba237e84 100644
--- a/random/gamma.lisp
+++ b/random/gamma.lisp
@@ -1,14 +1,17 @@
 ;; Gamma distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:45:09EST gamma.lisp>
+;; Time-stamp: <2008-12-26 19:45:35EST gamma.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun gamma-rd (generator a b)
   ;; Named #'gamma-rd to avoid confusion with the special function #'gamma.
   "gsl_ran_gamma"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the gamma distribution.
@@ -20,7 +23,7 @@
 
 (defmfun gamma-mt (generator a b)
   "gsl_ran_gamma_mt"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A gamma variate using the Marsaglia-Tsang fast gamma method.")
diff --git a/random/gaussian-bivariate.lisp b/random/gaussian-bivariate.lisp
index fc2b0ce7..c8866800 100644
--- a/random/gaussian-bivariate.lisp
+++ b/random/gaussian-bivariate.lisp
@@ -1,13 +1,15 @@
 ;; Gaussian bivariate distribution
 ;; Liam Healy, Sat Sep  2 2006 - 16:32
-;; Time-stamp: <2008-12-26 11:45:07EST gaussian-bivariate.lisp>
+;; Time-stamp: <2008-12-26 19:47:18EST gaussian-bivariate.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun bivariate-gaussian (generator sigma-x sigma-y rho)
   "gsl_ran_bivariate_gaussian"
-  (((generator generator) :pointer) (sigma-x :double) (sigma-y :double) (rho :double)
+  (((mpointer generator) :pointer) (sigma-x :double) (sigma-y :double) (rho :double)
    (x :double) (y :double))
   :c-return :void
   :documentation			; FDL
diff --git a/random/gaussian-tail.lisp b/random/gaussian-tail.lisp
index ef2db596..48845900 100644
--- a/random/gaussian-tail.lisp
+++ b/random/gaussian-tail.lisp
@@ -1,13 +1,15 @@
 ;; Gaussian tail distribution
 ;; Liam Healy, Mon Aug 21 2006 - 21:52
-;; Time-stamp: <2008-12-26 11:45:11EST gaussian-tail.lisp>
+;; Time-stamp: <2008-12-26 19:41:56EST gaussian-tail.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun gaussian-tail (generator a sigma)
   "gsl_ran_gaussian_tail"
-  (((generator generator) :pointer) (a :double) (sigma :double))
+  (((mpointer generator) :pointer) (a :double) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "Random variates from the upper tail of a Gaussian
@@ -32,7 +34,7 @@
 
 (defmfun ugaussian-tail (generator a)
   "gsl_ran_ugaussian_tail"
-  (((generator generator) :pointer) (a :double))
+  (((mpointer generator) :pointer) (a :double))
   :c-return :double
   :documentation			; FDL
   "Equivalent to gaussian-tail with sigma=1.")
diff --git a/random/gaussian.lisp b/random/gaussian.lisp
index 5018456d..bef7c275 100644
--- a/random/gaussian.lisp
+++ b/random/gaussian.lisp
@@ -1,13 +1,16 @@
 ;; Gaussian distribution
 ;; Liam Healy, Sun Jul 16 2006 - 22:09
-;; Time-stamp: <2008-12-26 11:45:12EST gaussian.lisp>
+;; Time-stamp: <2008-12-26 19:39:56EST gaussian.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun gaussian (generator sigma)
   "gsl_ran_gaussian"
-  (((generator generator) :pointer) (sigma :double))
+  (((mpointer generator) :pointer) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "A Gaussian random variate, with mean zero and
@@ -29,7 +32,7 @@
 
 (defmfun gaussian-ziggurat (generator sigma)
   "gsl_ran_gaussian_ziggurat"
-  (((generator generator) :pointer) (sigma :double))
+  (((mpointer generator) :pointer) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "Compute a Gaussian random variate using the alternative
@@ -38,14 +41,14 @@
 
 (defmfun gaussian-ratio-method (generator sigma)
   "gsl_ran_gaussian_ratio_method"
-  (((generator generator) :pointer) (sigma :double))
+  (((mpointer generator) :pointer) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "Compute a Gaussian random variate using the Kinderman-Monahan-Leva
    ratio method.")
 
 (defmfun ugaussian (generator)
-  "gsl_ran_ugaussian" (((generator generator) :pointer))
+  "gsl_ran_ugaussian" (((mpointer generator) :pointer))
   :c-return :double
   :documentation			; FDL
   "Compute results for the unit Gaussian distribution,
@@ -62,7 +65,7 @@
 
 (defmfun ugaussian-ratio-method (generator)
   "gsl_ran_ugaussian_ratio_method"
-  (((generator generator) :pointer))
+  (((mpointer generator) :pointer))
   :c-return :double
   :documentation			; FDL
   "Compute results for the unit Gaussian distribution,
diff --git a/random/geometric.lisp b/random/geometric.lisp
index f30b5e9f..1c08f482 100644
--- a/random/geometric.lisp
+++ b/random/geometric.lisp
@@ -1,13 +1,15 @@
 ;; Geometric distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:41:51EST geometric.lisp>
+;; Time-stamp: <2008-12-26 19:37:47EST geometric.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun geometric (generator p)
   "gsl_ran_geometric"
-  (((generator generator) :pointer) (p :double))
+  (((mpointer generator) :pointer) (p :double))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the geometric distribution,
diff --git a/random/gumbel1.lisp b/random/gumbel1.lisp
index a5083ce4..77db85d6 100644
--- a/random/gumbel1.lisp
+++ b/random/gumbel1.lisp
@@ -1,13 +1,16 @@
 ;; The Gumbel type 1 random number distribution
 ;; Liam Healy, Sun Oct 29 2006
-;; Time-stamp: <2008-12-26 11:48:46EST gumbel1.lisp>
+;; Time-stamp: <2008-12-26 19:50:48EST gumbel1.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun gumbel1 (generator a b)
   "gsl_ran_gumbel1"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Type-1 Gumbel
diff --git a/random/gumbel2.lisp b/random/gumbel2.lisp
index 93098653..ba2e0bc3 100644
--- a/random/gumbel2.lisp
+++ b/random/gumbel2.lisp
@@ -1,13 +1,16 @@
 ;; The Gumbel type 2 random number distribution
 ;; Liam Healy, Sun Oct 29 2006
-;; Time-stamp: <2008-12-26 11:45:10EST gumbel2.lisp>
+;; Time-stamp: <2008-12-26 19:43:32EST gumbel2.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun gumbel2 (generator a b)
   "gsl_ran_gumbel2"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Type-2 Gumbel
diff --git a/random/hypergeometric.lisp b/random/hypergeometric.lisp
index f07fa3c3..37162504 100644
--- a/random/hypergeometric.lisp
+++ b/random/hypergeometric.lisp
@@ -1,13 +1,16 @@
 ;; Hypergeometric distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:45:11EST hypergeometric.lisp>
+;; Time-stamp: <2008-12-26 19:42:50EST hypergeometric.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun hypergeometric (generator n1 n2 tt)
   "gsl_ran_hypergeometric"
-  (((generator generator) :pointer) (n1 :uint) (n2 :uint)(tt :uint))
+  (((mpointer generator) :pointer) (n1 :uint) (n2 :uint)(tt :uint))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the hypergeometric
diff --git a/random/landau.lisp b/random/landau.lisp
index d14b87fa..8847d9b4 100644
--- a/random/landau.lisp
+++ b/random/landau.lisp
@@ -1,13 +1,15 @@
 ;; Landau distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:38:58EST landau.lisp>
+;; Time-stamp: <2008-12-26 19:34:41EST landau.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun landau (generator)
   "gsl_ran_landau"
-  (((generator generator) :pointer))
+  (((mpointer generator) :pointer))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Landau distribution.  The
diff --git a/random/laplace.lisp b/random/laplace.lisp
index d114dc3e..89b12c81 100644
--- a/random/laplace.lisp
+++ b/random/laplace.lisp
@@ -1,13 +1,16 @@
 ;; Exponential distribution
 ;; Liam Healy, Sun Sep 17 2006
-;; Time-stamp: <2008-12-26 11:41:52EST laplace.lisp>
+;; Time-stamp: <2008-12-26 19:40:32EST laplace.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun laplace (generator a)
   "gsl_ran_laplace"
-  (((generator generator) :pointer) (a :double))
+  (((mpointer generator) :pointer) (a :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Laplace distribution with width a.
diff --git a/random/levy.lisp b/random/levy.lisp
index 6f6e37f9..c04678d9 100644
--- a/random/levy.lisp
+++ b/random/levy.lisp
@@ -1,13 +1,15 @@
 ;; Levy distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:45:09EST levy.lisp>
+;; Time-stamp: <2008-12-26 19:45:36EST levy.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun levy (generator c alpha)
   "gsl_ran_levy"
-  (((generator generator) :pointer) (c :double) (alpha :double))
+  (((mpointer generator) :pointer) (c :double) (alpha :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Levy symmetric stable
@@ -23,7 +25,7 @@
 
 (defmfun levy-skew (generator c alpha beta)
   "gsl_ran_levy_skew"
-  (((generator generator) :pointer) (c :double) (alpha :double) (beta :double))
+  (((mpointer generator) :pointer) (c :double) (alpha :double) (beta :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Levy skew stable
diff --git a/random/logarithmic.lisp b/random/logarithmic.lisp
index d1350343..73a7dc84 100644
--- a/random/logarithmic.lisp
+++ b/random/logarithmic.lisp
@@ -1,13 +1,15 @@
 ;; Logarithmic distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:41:53EST logarithmic.lisp>
+;; Time-stamp: <2008-12-26 19:36:20EST logarithmic.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun logarithmic (generator p)
   "gsl_ran_logarithmic"
-  (((generator generator) :pointer) (p :double))
+  (((mpointer generator) :pointer) (p :double))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the logarithmic distribution.
diff --git a/random/logistic.lisp b/random/logistic.lisp
index 025b090e..71258503 100644
--- a/random/logistic.lisp
+++ b/random/logistic.lisp
@@ -1,13 +1,16 @@
 ;; Logistic distribution
 ;; Liam Healy, Sat Oct  7 2006 - 16:13
-;; Time-stamp: <2008-12-26 11:45:08EST logistic.lisp>
+;; Time-stamp: <2008-12-26 19:45:34EST logistic.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun logistic (generator a)
   "gsl_ran_logistic"
-  (((generator generator) :pointer) (a :double))
+  (((mpointer generator) :pointer) (a :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the logistic distribution.  The distribution function is
diff --git a/random/multinomial.lisp b/random/multinomial.lisp
index e9512248..88f403f7 100644
--- a/random/multinomial.lisp
+++ b/random/multinomial.lisp
@@ -1,13 +1,15 @@
 ;; Multinomial distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:45:06EST multinomial.lisp>
+;; Time-stamp: <2008-12-26 19:50:51EST multinomial.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun multinomial (generator sum p n)
   "gsl_ran_multinomial"
-  (((generator generator) :pointer) 
+  (((mpointer generator) :pointer) 
    ((dim0 p) sizet)
    (sum sizet)
    ((c-pointer p) :pointer)
diff --git a/random/negative-binomial.lisp b/random/negative-binomial.lisp
index df5b9ea8..ad454513 100644
--- a/random/negative-binomial.lisp
+++ b/random/negative-binomial.lisp
@@ -1,17 +1,19 @@
 ;; Negative binomial and Pascal distributions
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:38:56EST negative-binomial.lisp>
+;; Time-stamp: <2008-12-26 19:34:40EST negative-binomial.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 ;;;;****************************************************************************
 ;;;; Negative binomial
 ;;;;****************************************************************************
 
 (defmfun negative-binomial (generator p n)
   "gsl_ran_negative_binomial"
-  (((generator generator) :pointer) (p :double) (n :double))
+  (((mpointer generator) :pointer) (p :double) (n :double))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the negative binomial
@@ -51,7 +53,7 @@
 
 (defmfun pascal (generator p n)
   "gsl_ran_pascal"
-  (((generator generator) :pointer) (p :double) (n :uint))
+  (((mpointer generator) :pointer) (p :double) (n :uint))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the Pascal distribution.  The
diff --git a/random/pareto.lisp b/random/pareto.lisp
index 17dda1d3..94bcabfd 100644
--- a/random/pareto.lisp
+++ b/random/pareto.lisp
@@ -1,13 +1,16 @@
 ;; Pareto distribution
 ;; Liam Healy, Sat Oct  8 2006 - 21:23
-;; Time-stamp: <2008-12-26 11:45:07EST pareto.lisp>
+;; Time-stamp: <2008-12-26 19:47:19EST pareto.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun pareto (generator a b)
   "gsl_ran_pareto"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Pareto distribution of order a.
diff --git a/random/poisson.lisp b/random/poisson.lisp
index f37c1169..6c2875aa 100644
--- a/random/poisson.lisp
+++ b/random/poisson.lisp
@@ -1,13 +1,16 @@
 ;; Poisson distribution
 ;; Liam Healy, Sat Nov 25 2006 - 16:00
-;; Time-stamp: <2008-12-26 11:46:06EST poisson.lisp>
+;; Time-stamp: <2008-12-26 19:50:50EST poisson.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun poisson (generator mu)
   "gsl_ran_poisson"
-  (((generator generator) :pointer) (mu :double))
+  (((mpointer generator) :pointer) (mu :double))
   :c-return :uint
   :documentation			; FDL
   "A random integer from the Poisson distribution with mean mu.
diff --git a/random/rayleigh-tail.lisp b/random/rayleigh-tail.lisp
index a8f1e19c..861d36f8 100644
--- a/random/rayleigh-tail.lisp
+++ b/random/rayleigh-tail.lisp
@@ -1,13 +1,15 @@
 ;; Rayleigh tail distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:48:47EST rayleigh-tail.lisp>
+;; Time-stamp: <2008-12-26 19:50:49EST rayleigh-tail.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun rayleigh-tail (generator a sigma)
   "gsl_ran_rayleigh_tail"
-  (((generator generator) :pointer) (a :double) (sigma :double))
+  (((mpointer generator) :pointer) (a :double) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the tail of the Rayleigh
diff --git a/random/rayleigh.lisp b/random/rayleigh.lisp
index 3c1da069..2eec01cc 100644
--- a/random/rayleigh.lisp
+++ b/random/rayleigh.lisp
@@ -1,13 +1,15 @@
 ;; Rayleigh distribution
 ;; Liam Healy, Sat Sep 30 2006
-;; Time-stamp: <2008-12-26 11:38:57EST rayleigh.lisp>
+;; Time-stamp: <2008-12-26 19:34:41EST rayleigh.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun rayleigh (generator sigma)
   "gsl_ran_rayleigh"
-  (((generator generator) :pointer) (sigma :double))
+  (((mpointer generator) :pointer) (sigma :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Rayleigh distribution with
diff --git a/random/shuffling-sampling.lisp b/random/shuffling-sampling.lisp
index b792dc19..ae452b6b 100644
--- a/random/shuffling-sampling.lisp
+++ b/random/shuffling-sampling.lisp
@@ -1,6 +1,6 @@
 ;; Shuffling and sampling
 ;; Liam Healy, Sat Dec  2 2006 - 18:40
-;; Time-stamp: <2008-12-26 12:43:16EST shuffling-sampling.lisp>
+;; Time-stamp: <2008-12-26 19:51:20EST shuffling-sampling.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -9,7 +9,7 @@
 
 (defmfun shuffle (generator base)
   "gsl_ran_shuffle"
-  (((generator generator) :pointer)
+  (((mpointer generator) :pointer)
    ((c-pointer base) :pointer) ((dim0 base) sizet) ((element-size base) sizet))
   :c-return :void
   :documentation			; FDL
@@ -22,7 +22,7 @@
 
 (defmfun choose-random (generator dest src)
   "gsl_ran_choose"
-  (((generator generator) :pointer)
+  (((mpointer generator) :pointer)
    ((c-pointer dest) :pointer) ((dim0 dest) sizet)
    ((c-pointer src) :pointer) ((dim0 src) sizet) ((element-size src) sizet))
   ;; This is described in the GSL docs as returning int, but it does
@@ -44,7 +44,7 @@
 
 (defmfun random-sample (generator dest src)
   "gsl_ran_sample"
-  (((generator generator) :pointer)
+  (((mpointer generator) :pointer)
    ((c-pointer dest) :pointer) ((dim0 dest) sizet)
    ((c-pointer src) :pointer) ((dim0 src) sizet) ((element-size src) sizet))
   :c-return :void
diff --git a/random/spherical-vector.lisp b/random/spherical-vector.lisp
index ee0ca8ae..c2539b35 100644
--- a/random/spherical-vector.lisp
+++ b/random/spherical-vector.lisp
@@ -1,15 +1,17 @@
 ;; Spherical Vector distribution
 ;; Liam Healy, Sun Oct  22 2006
-;; Time-stamp: <2008-12-26 11:45:05EST spherical-vector.lisp>
+;; Time-stamp: <2008-12-26 19:50:50EST spherical-vector.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 ;;; No test for #'direction-Nd yet.
 
 (defmfun direction-2d (generator)
   "gsl_ran_dir_2d"
-  (((generator generator) :pointer) (x :double) (y :double))
+  (((mpointer generator) :pointer) (x :double) (y :double))
   :c-return :void
   :documentation			; FDL
   "A random direction vector v = (x,y) in
@@ -18,7 +20,7 @@
 
 (defmfun direction-2d-trig-method (generator)
   "gsl_ran_dir_2d_trig_method"
-  (((generator generator) :pointer) (x :double) (y :double))
+  (((mpointer generator) :pointer) (x :double) (y :double))
   :c-return :void
   :documentation			; FDL
   "A random direction vector v = (x,y) in
@@ -27,7 +29,7 @@
 
 (defmfun direction-3d (generator)
   "gsl_ran_dir_3d"
-  (((generator generator) :pointer) (x :double) (y :double) (z :double))
+  (((mpointer generator) :pointer) (x :double) (y :double) (z :double))
   :c-return :void
   :documentation			; FDL
   "A random direction vector v =
@@ -40,7 +42,7 @@
 
 (defmfun direction-Nd (generator vector)
   "gsl_ran_dir_nd"
-  (((generator generator) :pointer) ((dim0 vector) sizet)
+  (((mpointer generator) :pointer) ((dim0 vector) sizet)
    ((c-pointer vector) :pointer))
   :c-return :void
   :outputs (vector)
diff --git a/random/tdist.lisp b/random/tdist.lisp
index e9157af3..c7a16888 100644
--- a/random/tdist.lisp
+++ b/random/tdist.lisp
@@ -1,13 +1,15 @@
 ;; Tdist distribution
 ;; Liam Healy, Sat Oct  7 2006 - 16:13
-;; Time-stamp: <2008-12-26 11:38:57EST tdist.lisp>
+;; Time-stamp: <2008-12-26 19:34:40EST tdist.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+
 (defmfun tdist (generator nu)
   "gsl_ran_tdist"
-  (((generator generator) :pointer) (nu :double))
+  (((mpointer generator) :pointer) (nu :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Student t-distribution.  The
@@ -55,7 +57,6 @@
 ;;; Examples and unit test
 (save-test tdist
   (let ((rng (make-random-number-generator *mt19937* 0)))
-      (rng-set rng 0)
       (loop for i from 0 to 10
 	    collect
 	    (tdist rng 10.0d0)))
diff --git a/random/weibull.lisp b/random/weibull.lisp
index 59186251..85a43b34 100644
--- a/random/weibull.lisp
+++ b/random/weibull.lisp
@@ -1,13 +1,16 @@
 ;; Weibull distribution
 ;; Liam Healy, Sun Oct 22 2006
-;; Time-stamp: <2008-12-26 11:41:55EST weibull.lisp>
+;; Time-stamp: <2008-12-26 19:39:33EST weibull.lisp>
 ;; $Id$
 
 (in-package :gsl)
 
+;;; /usr/include/gsl/gsl_randist.h
+;;; /usr/include/gsl/gsl_cdf.h
+
 (defmfun weibull (generator a b)
   "gsl_ran_weibull"
-  (((generator generator) :pointer) (a :double) (b :double))
+  (((mpointer generator) :pointer) (a :double) (b :double))
   :c-return :double
   :documentation			; FDL
   "A random variate from the Weibull distribution.  The distribution function is
diff --git a/simulated-annealing.lisp b/simulated-annealing.lisp
index f080fd11..e3ee4406 100644
--- a/simulated-annealing.lisp
+++ b/simulated-annealing.lisp
@@ -1,6 +1,6 @@
 ;; Simulated Annealing
 ;; Liam Healy Sun Feb 11 2007 - 17:23
-;; Time-stamp: <2008-03-15 23:10:25EDT simulated-annealing.lisp>
+;; Time-stamp: <2008-12-26 19:51:20EST simulated-annealing.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -58,7 +58,7 @@
 		;; copy-function copy-constructor destructor
 	       element-size parameters)
   "gsl_siman_solve"
-  (((generator generator) :pointer) (x0-p :pointer)
+  (((mpointer generator) :pointer) (x0-p :pointer)
    ((cffi:get-callback Ef) :pointer)
    ((cffi:get-callback take-step) :pointer)
    ((cffi:get-callback distance-function) :pointer)
@@ -110,7 +110,7 @@
 
 (defmacro def-step-function (name)
   "Define a step fuction for simulated annealing."
-  (let ((generator (gensym "GEN"))
+  (let ((mpointer (gensym "GEN"))
 	(arguments (gensym "ARGS"))
 	(step-size (gensym "SS")))
     `(cffi:defcallback ,name :void
-- 
GitLab