Commit b28a6a5a authored by Liam Healy's avatar Liam Healy

Rename constants to +...+

Rename constant pointers into the GSL library to +...+ from *...*.
parent 26de0158
;; Basis splines. ;; Basis splines.
;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp ;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp
;; Time-stamp: <2009-01-28 20:55:57EST basis-splines.lisp> ;; Time-stamp: <2009-02-16 10:16:44EST basis-splines.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
(nbreak (+ ncoeffs 2 (- order))) (nbreak (+ ncoeffs 2 (- order)))
(bw (make-basis-spline order nbreak)) (bw (make-basis-spline order nbreak))
(mw (make-fit-workspace ndata ncoeffs)) (mw (make-fit-workspace ndata ncoeffs))
(rng (make-random-number-generator *mt19937* 0)) (rng (make-random-number-generator +mt19937+ 0))
(B (make-marray 'double-float :dimensions ncoeffs)) (B (make-marray 'double-float :dimensions ncoeffs))
(c (make-marray 'double-float :dimensions ncoeffs)) (c (make-marray 'double-float :dimensions ncoeffs))
(cov (make-marray 'double-float :dimensions (list ncoeffs ncoeffs))) (cov (make-marray 'double-float :dimensions (list ncoeffs ncoeffs)))
......
;; Monte Carlo Integration ;; Monte Carlo Integration
;; Liam Healy Sat Feb 3 2007 - 17:42 ;; Liam Healy Sat Feb 3 2007 - 17:42
;; Time-stamp: <2009-02-15 22:07:40EST monte-carlo.lisp> ;; Time-stamp: <2009-02-16 10:16:43EST monte-carlo.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -247,21 +247,21 @@ ...@@ -247,21 +247,21 @@
(let ((ws (make-monte-carlo-plain 3)) (let ((ws (make-monte-carlo-plain 3))
(lower #m(0.0d0 0.0d0 0.0d0)) (lower #m(0.0d0 0.0d0 0.0d0))
(upper (make-marray 'double-float :initial-contents (list pi pi pi))) (upper (make-marray 'double-float :initial-contents (list pi pi pi)))
(rng (make-random-number-generator *mt19937* 0))) (rng (make-random-number-generator +mt19937+ 0)))
(monte-carlo-integrate-plain 'mcrw lower upper nsamples rng ws))) (monte-carlo-integrate-plain 'mcrw lower upper nsamples rng ws)))
(defun random-walk-miser-example (&optional (nsamples 500000)) (defun random-walk-miser-example (&optional (nsamples 500000))
(let ((ws (make-monte-carlo-miser 3)) (let ((ws (make-monte-carlo-miser 3))
(lower #m(0.0d0 0.0d0 0.0d0)) (lower #m(0.0d0 0.0d0 0.0d0))
(upper (make-marray 'double-float :initial-contents (list pi pi pi))) (upper (make-marray 'double-float :initial-contents (list pi pi pi)))
(rng (make-random-number-generator *mt19937* 0))) (rng (make-random-number-generator +mt19937+ 0)))
(monte-carlo-integrate-miser 'mcrw lower upper nsamples rng ws))) (monte-carlo-integrate-miser 'mcrw lower upper nsamples rng ws)))
(defun random-walk-vegas-example (&optional (nsamples 500000)) (defun random-walk-vegas-example (&optional (nsamples 500000))
(let ((ws (make-monte-carlo-vegas 3)) (let ((ws (make-monte-carlo-vegas 3))
(lower #m(0.0d0 0.0d0 0.0d0)) (lower #m(0.0d0 0.0d0 0.0d0))
(upper (make-marray 'double-float :initial-contents (list pi pi pi))) (upper (make-marray 'double-float :initial-contents (list pi pi pi)))
(rng (make-random-number-generator *mt19937* 0))) (rng (make-random-number-generator +mt19937+ 0)))
(monte-carlo-integrate-vegas 'mcrw lower upper nsamples rng ws))) (monte-carlo-integrate-vegas 'mcrw lower upper nsamples rng ws)))
(save-test monte-carlo (save-test monte-carlo
......
;; Example spline ;; Example spline
;; Liam Healy, Sat Nov 10 2007 - 21:18 ;; Liam Healy, Sat Nov 10 2007 - 21:18
;; Time-stamp: <2009-01-28 19:05:32EST spline-example.lisp> ;; Time-stamp: <2009-02-16 09:46:57EST spline-example.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:initial-contents :initial-contents
(loop for i from 0.0d0 below 10.0d0 (loop for i from 0.0d0 below 10.0d0
collect (+ i (cos (expt i 2)))))) collect (+ i (cos (expt i 2))))))
(spline (make-spline *cubic-spline-interpolation* xarr yarr))) (spline (make-spline +cubic-spline-interpolation+ xarr yarr)))
(loop for xi from (maref xarr 0) below (maref xarr 9) by step (loop for xi from (maref xarr 0) below (maref xarr 9) by step
collect (list xi (evaluate spline xi :acceleration acc))))) collect (list xi (evaluate spline xi :acceleration acc)))))
......
;; Interpolation types ;; Interpolation types
;; Liam Healy, Sun Nov 4 2007 - 17:41 ;; Liam Healy, Sun Nov 4 2007 - 17:41
;; Time-stamp: <2009-01-28 21:02:31EST types.lisp> ;; Time-stamp: <2009-02-16 09:46:04EST types.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
(defmpar *linear-interpolation* "gsl_interp_linear" (defmpar +linear-interpolation+ "gsl_interp_linear"
;; FDL ;; FDL
"Linear interpolation. This interpolation method does not require any "Linear interpolation. This interpolation method does not require any
additional memory.") additional memory.")
(defmpar *polynomial-interpolation* "gsl_interp_polynomial" (defmpar +polynomial-interpolation+ "gsl_interp_polynomial"
;; FDL ;; FDL
"Polynomial interpolation. This method should only be used for "Polynomial interpolation. This method should only be used for
interpolating small numbers of points because polynomial interpolation interpolating small numbers of points because polynomial interpolation
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
number of terms in the interpolating polynomial is equal to the number number of terms in the interpolating polynomial is equal to the number
of points.") of points.")
(defmpar *cubic-spline-interpolation* "gsl_interp_cspline" (defmpar +cubic-spline-interpolation+ "gsl_interp_cspline"
;; FDL ;; FDL
"Cubic spline with natural boundary conditions. The resulting curve is "Cubic spline with natural boundary conditions. The resulting curve is
piecewise cubic on each interval, with matching first and second piecewise cubic on each interval, with matching first and second
derivatives at the supplied data-points. The second derivative is derivatives at the supplied data-points. The second derivative is
chosen to be zero at the first point and last point.") chosen to be zero at the first point and last point.")
(defmpar *periodic-cubic-spline-interpolation* "gsl_interp_cspline_periodic" (defmpar +periodic-cubic-spline-interpolation+ "gsl_interp_cspline_periodic"
;; FDL ;; FDL
"Cubic spline with periodic boundary conditions. The resulting curve "Cubic spline with periodic boundary conditions. The resulting curve
is piecewise cubic on each interval, with matching first and second is piecewise cubic on each interval, with matching first and second
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
resulting periodic interpolation will have a discontinuity at the resulting periodic interpolation will have a discontinuity at the
boundary.") boundary.")
(defmpar *akima-interpolation* "gsl_interp_akima" (defmpar +akima-interpolation+ "gsl_interp_akima"
;; FDL ;; FDL
"Non-rounded Akima spline with natural boundary conditions. This method "Non-rounded Akima spline with natural boundary conditions. This method
uses the non-rounded corner algorithm of Wodicka.") uses the non-rounded corner algorithm of Wodicka.")
(defmpar *periodic-akima-interpolation* "gsl_interp_akima_periodic" (defmpar +periodic-akima-interpolation+ "gsl_interp_akima_periodic"
;; FDL ;; FDL
"Non-rounded Akima spline with periodic boundary conditions. This method "Non-rounded Akima spline with periodic boundary conditions. This method
uses the non-rounded corner algorithm of Wodicka.") uses the non-rounded corner algorithm of Wodicka.")
......
;; Example ODE ;; Example ODE
;; Liam Healy Sat Sep 29 2007 - 17:49 ;; Liam Healy Sat Sep 29 2007 - 17:49
;; Time-stamp: <2009-02-15 09:09:55EST ode-example.lisp> ;; Time-stamp: <2009-02-16 10:18:29EST ode-example.lisp>
;; $Id$ ;; $Id$
;;; van der Pol as given in Section 25.5 of the GSL manual. To ;;; van der Pol as given in Section 25.5 of the GSL manual. To
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
(make-callbacks ode-stepper vanderpol vanderpol-jacobian 2) (make-callbacks ode-stepper vanderpol vanderpol-jacobian 2)
(defun integrate-vanderpol (defun integrate-vanderpol
(max-time &optional (step-size 1.0d-6) (stepper *step-rk8pd*) (print-steps t)) (max-time &optional (step-size 1.0d-6) (stepper +step-rk8pd+) (print-steps t))
"Integrate the van der Pol oscillator as given in Section 25.5 of the "Integrate the van der Pol oscillator as given in Section 25.5 of the
GSL manual. To reproduce that example, (integrate-vanderpol 100.0d0)." GSL manual. To reproduce that example, (integrate-vanderpol 100.0d0)."
(let ((mu 10.0d0) (initial-time 0.0d0) (iter 0)) (let ((mu 10.0d0) (initial-time 0.0d0) (iter 0))
...@@ -48,14 +48,14 @@ ...@@ -48,14 +48,14 @@
(save-test (save-test
ode ode
(integrate-vanderpol 1.0d0 1.d-4 *step-rk2* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rk2+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rk4* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rk4+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rkf45* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rkf45+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rkck* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rkck+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rk8pd* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rk8pd+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rk2imp* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rk2imp+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-rk4imp* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-rk4imp+ nil)
(integrate-vanderpol 1.0d0 1.d-4 *step-bsimp* nil) (integrate-vanderpol 1.0d0 1.d-4 +step-bsimp+ nil)
(let ((*max-iter* 12000)) (let ((*max-iter* 12000))
(integrate-vanderpol 1.0d0 1.d-4 *step-gear1* nil)) (integrate-vanderpol 1.0d0 1.d-4 +step-gear1+ nil))
(integrate-vanderpol 1.0d0 1.d-4 *step-gear2* nil)) (integrate-vanderpol 1.0d0 1.d-4 +step-gear2+ nil))
;; Stepping functions for ODE systems. ;; Stepping functions for ODE systems.
;; Liam Healy, Mon Sep 24 2007 - 21:33 ;; Liam Healy, Mon Sep 24 2007 - 21:33
;; Time-stamp: <2009-02-15 09:19:47EST stepping.lisp> ;; Time-stamp: <2009-02-16 09:57:47EST stepping.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -121,44 +121,44 @@ values): ...@@ -121,44 +121,44 @@ values):
User-supplied functions defined in the system dydt User-supplied functions defined in the system dydt
should signal an error or return the correct value.") should signal an error or return the correct value.")
(defmpar *step-rk2* "gsl_odeiv_step_rk2" (defmpar +step-rk2+ "gsl_odeiv_step_rk2"
;; FDL ;; FDL
"Embedded Runge-Kutta (2, 3) method.") "Embedded Runge-Kutta (2, 3) method.")
(defmpar *step-rk4* "gsl_odeiv_step_rk4" (defmpar +step-rk4+ "gsl_odeiv_step_rk4"
;; FDL ;; FDL
"4th order (classical) Runge-Kutta.") "4th order (classical) Runge-Kutta.")
(defmpar *step-rkf45* "gsl_odeiv_step_rkf45" (defmpar +step-rkf45+ "gsl_odeiv_step_rkf45"
;; FDL ;; FDL
"Embedded Runge-Kutta-Fehlberg (4, 5) method. This method is a good "Embedded Runge-Kutta-Fehlberg (4, 5) method. This method is a good
general-purpose integrator.") general-purpose integrator.")
(defmpar *step-rkck* "gsl_odeiv_step_rkck" (defmpar +step-rkck+ "gsl_odeiv_step_rkck"
;; FDL ;; FDL
"Embedded Runge-Kutta Cash-Karp (4, 5) method.") "Embedded Runge-Kutta Cash-Karp (4, 5) method.")
(defmpar *step-rk8pd* "gsl_odeiv_step_rk8pd" (defmpar +step-rk8pd+ "gsl_odeiv_step_rk8pd"
;; FDL ;; FDL
"Embedded Runge-Kutta Prince-Dormand (8,9) method.") "Embedded Runge-Kutta Prince-Dormand (8,9) method.")
(defmpar *step-rk2imp* "gsl_odeiv_step_rk2imp" (defmpar +step-rk2imp+ "gsl_odeiv_step_rk2imp"
;; FDL ;; FDL
"Implicit 2nd order Runge-Kutta at Gaussian points.") "Implicit 2nd order Runge-Kutta at Gaussian points.")
(defmpar *step-rk4imp* "gsl_odeiv_step_rk4imp" (defmpar +step-rk4imp+ "gsl_odeiv_step_rk4imp"
;; FDL ;; FDL
"Implicit 4th order Runge-Kutta at Gaussian points.") "Implicit 4th order Runge-Kutta at Gaussian points.")
(defmpar *step-bsimp* "gsl_odeiv_step_bsimp" (defmpar +step-bsimp+ "gsl_odeiv_step_bsimp"
;; FDL ;; FDL
"Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm "Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm
requires the Jacobian.") requires the Jacobian.")
(defmpar *step-gear1* "gsl_odeiv_step_gear1" (defmpar +step-gear1+ "gsl_odeiv_step_gear1"
;; FDL ;; FDL
"M=1 implicit Gear method.") "M=1 implicit Gear method.")
(defmpar *step-gear2* "gsl_odeiv_step_gear2" (defmpar +step-gear2+ "gsl_odeiv_step_gear2"
;; FDL ;; FDL
"M=2 implicit Gear method.") "M=2 implicit Gear method.")
;; Bernoulli distribution ;; Bernoulli distribution
;; Liam Healy, Sat Nov 25 2006 - 16:59 ;; Liam Healy, Sat Nov 25 2006 - 16:59
;; Time-stamp: <2008-12-26 18:05:04EST bernoulli.lisp> ;; Time-stamp: <2009-02-16 10:08:17EST bernoulli.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test bernoulli (save-test bernoulli
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(bernoulli rng 0.5d0))) (bernoulli rng 0.5d0)))
......
;; Beta distribution ;; Beta distribution
;; Liam Healy, Sat Sep 30 2006 ;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:29:42EST beta.lisp> ;; Time-stamp: <2009-02-16 10:10:32EST beta.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test beta (save-test beta
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(beta-rd rng 1.0d0 2.0d0))) (beta-rd rng 1.0d0 2.0d0)))
......
;; Binomial distribution ;; Binomial distribution
;; Liam Healy, Sat Nov 25 2006 - 16:00 ;; Liam Healy, Sat Nov 25 2006 - 16:00
;; Time-stamp: <2008-12-26 19:34:39EST binomial.lisp> ;; Time-stamp: <2009-02-16 10:05:55EST binomial.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test binomial (save-test binomial
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(binomial rng 0.4d0 12))) (binomial rng 0.4d0 12)))
......
;; Cauchy distribution ;; Cauchy distribution
;; Liam Healy, Sat Sep 30 2006 ;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:40:10EST cauchy.lisp> ;; Time-stamp: <2009-02-16 10:08:14EST cauchy.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test cauchy (save-test cauchy
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(cauchy rng 10.0d0))) (cauchy rng 10.0d0)))
......
;; Chi-squared distribution ;; Chi-squared distribution
;; Liam Healy, Sat Oct 7 2006 - 16:13 ;; Liam Healy, Sat Oct 7 2006 - 16:13
;; Time-stamp: <2008-12-26 19:47:17EST chi-squared.lisp> ;; Time-stamp: <2009-02-16 10:10:33EST chi-squared.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test chi-squared (save-test chi-squared
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(chi-squared rng 10.0d0))) (chi-squared rng 10.0d0)))
......
;; Dirichlet distribution ;; Dirichlet distribution
;; Liam Healy, Sun Oct 29 2006 ;; Liam Healy, Sun Oct 29 2006
;; Time-stamp: <2008-12-29 22:22:57EST dirichlet.lisp> ;; Time-stamp: <2009-02-16 10:10:31EST dirichlet.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test dirichlet (save-test dirichlet
(let ((rng (make-random-number-generator *mt19937* 0)) (let ((rng (make-random-number-generator +mt19937+ 0))
(alpha #m(1.0d0 2.0d0 3.0d0 4.0d0)) (alpha #m(1.0d0 2.0d0 3.0d0 4.0d0))
(theta (make-marray 'double-float :dimensions 4))) (theta (make-marray 'double-float :dimensions 4)))
(dirichlet rng alpha theta) (dirichlet rng alpha theta)
......
;; Discrete random variables ;; Discrete random variables
;; Liam Healy, Sat Nov 11 2006 - 21:51 ;; Liam Healy, Sat Nov 11 2006 - 21:51
;; Time-stamp: <2009-01-25 11:17:05EST discrete.lisp> ;; Time-stamp: <2009-02-16 10:08:14EST discrete.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
(save-test discrete (save-test discrete
(let* ((probabilities #m(0.25d0 0.5d0 0.25d0)) (let* ((probabilities #m(0.25d0 0.5d0 0.25d0))
(table (make-discrete-random probabilities)) (table (make-discrete-random probabilities))
(rng (make-random-number-generator *mt19937* 0))) (rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(discrete rng table))) (discrete rng table)))
......
;; Exponential power distribution ;; Exponential power distribution
;; Liam Healy, Sat Sep 30 2006 ;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:36:20EST exponential-power.lisp> ;; Time-stamp: <2009-02-16 10:08:16EST exponential-power.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test exponential-power (save-test exponential-power
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(exponential-power rng 1.0d0 2.0d0))) (exponential-power rng 1.0d0 2.0d0)))
......
;; Exponential distribution ;; Exponential distribution
;; Liam Healy, Sat Sep 2 2006 - 19:04 ;; Liam Healy, Sat Sep 2 2006 - 19:04
;; Time-stamp: <2008-12-26 19:45:35EST exponential.lisp> ;; Time-stamp: <2009-02-16 10:08:11EST exponential.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test exponential (save-test exponential
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(exponential rng 10.0d0))) (exponential rng 10.0d0)))
......
;; Fdist distribution ;; Fdist distribution
;; Liam Healy, Sat Sep 30 2006 ;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:39:09EST fdist.lisp> ;; Time-stamp: <2009-02-16 10:08:13EST fdist.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test fdist (save-test fdist
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(fdist rng 1.0d0 2.0d0))) (fdist rng 1.0d0 2.0d0)))
......
;; Flat distribution ;; Flat distribution
;; Liam Healy, Oct 7 2006 ;; Liam Healy, Oct 7 2006
;; Time-stamp: <2008-12-26 19:36:22EST flat.lisp> ;; Time-stamp: <2009-02-16 10:08:17EST flat.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test flat (save-test flat
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(flat rng 1.0d0 2.0d0))) (flat rng 1.0d0 2.0d0)))
......
;; Gamma distribution ;; Gamma distribution
;; Liam Healy, Sat Sep 30 2006 ;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:45:35EST gamma.lisp> ;; Time-stamp: <2009-02-16 10:08:11EST gamma.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test gamma-randist (save-test gamma-randist
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(gamma-rd rng 1.0d0 2.0d0))) (gamma-rd rng 1.0d0 2.0d0)))
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(gamma-mt rng 1.0d0 2.0d0))) (gamma-mt rng 1.0d0 2.0d0)))
......
;; Gaussian bivariate distribution ;; Gaussian bivariate distribution
;; Liam Healy, Sat Sep 2 2006 - 16:32 ;; Liam Healy, Sat Sep 2 2006 - 16:32
;; Time-stamp: <2008-12-26 19:47:18EST gaussian-bivariate.lisp> ;; Time-stamp: <2009-02-16 10:10:33EST gaussian-bivariate.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test gaussian-bivariate (save-test gaussian-bivariate
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(bivariate-gaussian rng 1.0d0 0.75d0 0.25d0))) (bivariate-gaussian rng 1.0d0 0.75d0 0.25d0)))
......
;; Gaussian tail distribution ;; Gaussian tail distribution
;; Liam Healy, Mon Aug 21 2006 - 21:52 ;; Liam Healy, Mon Aug 21 2006 - 21:52
;; Time-stamp: <2008-12-26 19:41:56EST gaussian-tail.lisp> ;; Time-stamp: <2009-02-16 10:08:12EST gaussian-tail.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test (save-test
gaussian-tail gaussian-tail
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(gaussian-tail rng 50.0d0 10.0d0))) (gaussian-tail rng 50.0d0 10.0d0)))
(gaussian-tail-pdf 52.0d0 50.0d0 10.0d0) (gaussian-tail-pdf 52.0d0 50.0d0 10.0d0)
(let ((rng (make-random-number-generator *mt19937* 0))) (let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10 (loop for i from 0 to 10
collect collect
(ugaussian-tail rng 5.0d0))) (ugaussian-tail rng 5.0d0)))
......
;; Gaussian distribution ;; Gaussian distribution
;; Liam Healy, Sun Jul 16 2006 - 22:09 ;; Liam Healy, Sun Jul 16 2006 - 22:09
;; Time-stamp: <2008-12-26 19:39:56EST gaussian.lisp> ;; Time-stamp: <2009-02-16 10:08:13EST gaussian.lisp>
;; $Id$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -131,12 +131,12 @@ ...@@ -131,12 +131,12 @@
;;; Examples and unit test ;;; Examples and unit test
(save-test (save-test
gaussian gaussian