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.
;; 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$
(in-package :gsl)
......@@ -95,7 +95,7 @@
(nbreak (+ ncoeffs 2 (- order)))
(bw (make-basis-spline order nbreak))
(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))
(c (make-marray 'double-float :dimensions ncoeffs))
(cov (make-marray 'double-float :dimensions (list ncoeffs ncoeffs)))
......
;; Monte Carlo Integration
;; 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$
(in-package :gsl)
......@@ -247,21 +247,21 @@
(let ((ws (make-monte-carlo-plain 3))
(lower #m(0.0d0 0.0d0 0.0d0))
(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)))
(defun random-walk-miser-example (&optional (nsamples 500000))
(let ((ws (make-monte-carlo-miser 3))
(lower #m(0.0d0 0.0d0 0.0d0))
(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)))
(defun random-walk-vegas-example (&optional (nsamples 500000))
(let ((ws (make-monte-carlo-vegas 3))
(lower #m(0.0d0 0.0d0 0.0d0))
(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)))
(save-test monte-carlo
......
;; Example spline
;; 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$
(in-package :gsl)
......@@ -20,7 +20,7 @@
:initial-contents
(loop for i from 0.0d0 below 10.0d0
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
collect (list xi (evaluate spline xi :acceleration acc)))))
......
;; Interpolation types
;; 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$
(in-package :gsl)
(defmpar *linear-interpolation* "gsl_interp_linear"
(defmpar +linear-interpolation+ "gsl_interp_linear"
;; FDL
"Linear interpolation. This interpolation method does not require any
additional memory.")
(defmpar *polynomial-interpolation* "gsl_interp_polynomial"
(defmpar +polynomial-interpolation+ "gsl_interp_polynomial"
;; FDL
"Polynomial interpolation. This method should only be used for
interpolating small numbers of points because polynomial interpolation
......@@ -18,14 +18,14 @@
number of terms in the interpolating polynomial is equal to the number
of points.")
(defmpar *cubic-spline-interpolation* "gsl_interp_cspline"
(defmpar +cubic-spline-interpolation+ "gsl_interp_cspline"
;; FDL
"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.")
(defmpar *periodic-cubic-spline-interpolation* "gsl_interp_cspline_periodic"
(defmpar +periodic-cubic-spline-interpolation+ "gsl_interp_cspline_periodic"
;; FDL
"Cubic spline with periodic boundary conditions. The resulting curve
is piecewise cubic on each interval, with matching first and second
......@@ -35,12 +35,12 @@
resulting periodic interpolation will have a discontinuity at the
boundary.")
(defmpar *akima-interpolation* "gsl_interp_akima"
(defmpar +akima-interpolation+ "gsl_interp_akima"
;; FDL
"Non-rounded Akima spline with natural boundary conditions. This method
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
"Non-rounded Akima spline with periodic boundary conditions. This method
uses the non-rounded corner algorithm of Wodicka.")
......
;; Example ODE
;; 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$
;;; van der Pol as given in Section 25.5 of the GSL manual. To
......@@ -29,7 +29,7 @@
(make-callbacks ode-stepper vanderpol vanderpol-jacobian 2)
(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
GSL manual. To reproduce that example, (integrate-vanderpol 100.0d0)."
(let ((mu 10.0d0) (initial-time 0.0d0) (iter 0))
......@@ -48,14 +48,14 @@
(save-test
ode
(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-rkf45* 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-rk2imp* 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-rk2+ 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-rkck+ 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-rk4imp+ nil)
(integrate-vanderpol 1.0d0 1.d-4 +step-bsimp+ nil)
(let ((*max-iter* 12000))
(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-gear1+ nil))
(integrate-vanderpol 1.0d0 1.d-4 +step-gear2+ nil))
;; Stepping functions for ODE systems.
;; 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$
(in-package :gsl)
......@@ -121,44 +121,44 @@ values):
User-supplied functions defined in the system dydt
should signal an error or return the correct value.")
(defmpar *step-rk2* "gsl_odeiv_step_rk2"
(defmpar +step-rk2+ "gsl_odeiv_step_rk2"
;; FDL
"Embedded Runge-Kutta (2, 3) method.")
(defmpar *step-rk4* "gsl_odeiv_step_rk4"
(defmpar +step-rk4+ "gsl_odeiv_step_rk4"
;; FDL
"4th order (classical) Runge-Kutta.")
(defmpar *step-rkf45* "gsl_odeiv_step_rkf45"
(defmpar +step-rkf45+ "gsl_odeiv_step_rkf45"
;; FDL
"Embedded Runge-Kutta-Fehlberg (4, 5) method. This method is a good
general-purpose integrator.")
(defmpar *step-rkck* "gsl_odeiv_step_rkck"
(defmpar +step-rkck+ "gsl_odeiv_step_rkck"
;; FDL
"Embedded Runge-Kutta Cash-Karp (4, 5) method.")
(defmpar *step-rk8pd* "gsl_odeiv_step_rk8pd"
(defmpar +step-rk8pd+ "gsl_odeiv_step_rk8pd"
;; FDL
"Embedded Runge-Kutta Prince-Dormand (8,9) method.")
(defmpar *step-rk2imp* "gsl_odeiv_step_rk2imp"
(defmpar +step-rk2imp+ "gsl_odeiv_step_rk2imp"
;; FDL
"Implicit 2nd order Runge-Kutta at Gaussian points.")
(defmpar *step-rk4imp* "gsl_odeiv_step_rk4imp"
(defmpar +step-rk4imp+ "gsl_odeiv_step_rk4imp"
;; FDL
"Implicit 4th order Runge-Kutta at Gaussian points.")
(defmpar *step-bsimp* "gsl_odeiv_step_bsimp"
(defmpar +step-bsimp+ "gsl_odeiv_step_bsimp"
;; FDL
"Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm
requires the Jacobian.")
(defmpar *step-gear1* "gsl_odeiv_step_gear1"
(defmpar +step-gear1+ "gsl_odeiv_step_gear1"
;; FDL
"M=1 implicit Gear method.")
(defmpar *step-gear2* "gsl_odeiv_step_gear2"
(defmpar +step-gear2+ "gsl_odeiv_step_gear2"
;; FDL
"M=2 implicit Gear method.")
;; Bernoulli distribution
;; 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$
(in-package :gsl)
......@@ -26,7 +26,7 @@
;;; Examples and unit test
(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
collect
(bernoulli rng 0.5d0)))
......
;; Beta distribution
;; 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$
(in-package :gsl)
......@@ -53,7 +53,7 @@
;;; Examples and unit test
(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
collect
(beta-rd rng 1.0d0 2.0d0)))
......
;; Binomial distribution
;; 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$
(in-package :gsl)
......@@ -43,7 +43,7 @@
;;; Examples and unit test
(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
collect
(binomial rng 0.4d0 12)))
......
;; Cauchy distribution
;; 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$
(in-package :gsl)
......@@ -58,7 +58,7 @@
;;; Examples and unit test
(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
collect
(cauchy rng 10.0d0)))
......
;; Chi-squared distribution
;; 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$
(in-package :gsl)
......@@ -56,7 +56,7 @@
;;; Examples and unit test
(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
collect
(chi-squared rng 10.0d0)))
......
;; Dirichlet distribution
;; 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$
(in-package :gsl)
......@@ -63,7 +63,7 @@
;;; Examples and unit test
(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))
(theta (make-marray 'double-float :dimensions 4)))
(dirichlet rng alpha theta)
......
;; Discrete random variables
;; 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$
(in-package :gsl)
......@@ -43,7 +43,7 @@
(save-test discrete
(let* ((probabilities #m(0.25d0 0.5d0 0.25d0))
(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
collect
(discrete rng table)))
......
;; Exponential power distribution
;; 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$
(in-package :gsl)
......@@ -46,7 +46,7 @@
;;; Examples and unit test
(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
collect
(exponential-power rng 1.0d0 2.0d0)))
......
;; Exponential distribution
;; 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$
(in-package :gsl)
......@@ -56,7 +56,7 @@
;;; Examples and unit test
(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
collect
(exponential rng 10.0d0)))
......
;; Fdist distribution
;; 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$
(in-package :gsl)
......@@ -64,7 +64,7 @@
;;; Examples and unit test
(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
collect
(fdist rng 1.0d0 2.0d0)))
......
;; Flat distribution
;; 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$
(in-package :gsl)
......@@ -55,7 +55,7 @@
;;; Examples and unit test
(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
collect
(flat rng 1.0d0 2.0d0)))
......
;; Gamma distribution
;; 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$
(in-package :gsl)
......@@ -66,11 +66,11 @@
;;; Examples and unit test
(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
collect
(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
collect
(gamma-mt rng 1.0d0 2.0d0)))
......
;; Gaussian bivariate distribution
;; 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$
(in-package :gsl)
......@@ -36,7 +36,7 @@
;;; Examples and unit test
(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
collect
(bivariate-gaussian rng 1.0d0 0.75d0 0.25d0)))
......
;; Gaussian tail distribution
;; 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$
(in-package :gsl)
......@@ -48,12 +48,12 @@
;;; Examples and unit test
(save-test
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
collect
(gaussian-tail rng 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
collect
(ugaussian-tail rng 5.0d0)))
......
;; Gaussian distribution
;; 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$
(in-package :gsl)
......@@ -131,12 +131,12 @@
;;; Examples and unit test
(save-test
gaussian
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(gaussian rng 10.0d0)))
(gaussian-pdf 0.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
collect
(gaussian-ziggurat rng 10.0d0)))
......
;; Generators of random numbers.
;; Liam Healy, Sat Jul 15 2006 - 14:43
;; Time-stamp: <2009-01-25 09:57:17EST generators.lisp>
;; Time-stamp: <2009-02-16 10:10:32EST generators.lisp>
;; $Id$
(in-package :gsl)
......@@ -33,7 +33,7 @@
;;;; Seed
;;;;****************************************************************************
(defmpar *default-seed*
(defmpar +default-seed+
"gsl_rng_default_seed"
"The default seed for random number generators."
:ulong nil)
......@@ -174,7 +174,7 @@
;;;;****************************************************************************
(save-test random-number-generators
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(uniform-fixnum rng 1000)))
......
;; Geometric distribution
;; Liam Healy, Sat Nov 25 2006 - 16:00
;; Time-stamp: <2008-12-26 19:37:47EST geometric.lisp>
;; Time-stamp: <2009-02-16 10:08:14EST geometric.lisp>
;; $Id$
(in-package :gsl)
......@@ -44,7 +44,7 @@
;;; Examples and unit test
(save-test geometric
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(geometric rng 0.4d0)))
......
;; The Gumbel type 1 random number distribution
;; Liam Healy, Sun Oct 29 2006
;; Time-stamp: <2008-12-26 19:50:48EST gumbel1.lisp>
;; Time-stamp: <2009-02-16 10:10:30EST gumbel1.lisp>
;; $Id$
(in-package :gsl)
......@@ -60,7 +60,7 @@
;;; Examples and unit test
(save-test gumbel1
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect (gumbel1 rng 1.0d0 2.0d0)))
(gumbel1-pdf 0.1d0 1.0d0 2.0d0)
......
;; The Gumbel type 2 random number distribution
;; Liam Healy, Sun Oct 29 2006
;; Time-stamp: <2008-12-26 19:43:32EST gumbel2.lisp>
;; Time-stamp: <2009-02-16 10:08:12EST gumbel2.lisp>
;; $Id$
(in-package :gsl)
......@@ -58,7 +58,7 @@
;;; Examples and unit test
(save-test gumbel2
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(gumbel2 rng 1.0d0 2.0d0)))
......
;; Hypergeometric distribution
;; Liam Healy, Sat Nov 25 2006 - 16:00
;; Time-stamp: <2008-12-26 19:42:50EST hypergeometric.lisp>
;; Time-stamp: <2009-02-16 10:08:12EST hypergeometric.lisp>
;; $Id$
(in-package :gsl)
......@@ -50,7 +50,7 @@
;;; Examples and unit test
(save-test hypergeometric-randist
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(hypergeometric rng 3 6 3)))
......
;; Landau distribution
;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:34:41EST landau.lisp>
;; Time-stamp: <2009-02-16 10:05:57EST landau.lisp>
;; $Id$
(in-package :gsl)
......@@ -30,7 +30,7 @@
;;; Examples and unit test
(save-test landau
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect (landau rng)))
(landau-pdf 0.25d0))
;; Exponential distribution
;; Liam Healy, Sun Sep 17 2006
;; Time-stamp: <2008-12-26 19:40:32EST laplace.lisp>
;; Time-stamp: <2009-02-16 10:08:15EST laplace.lisp>
;; $Id$
(in-package :gsl)
......@@ -56,7 +56,7 @@
;;; Examples and unit test
(save-test laplace
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(laplace rng 10.0d0)))
......
;; Levy distribution
;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-26 19:45:36EST levy.lisp>
;; Time-stamp: <2009-02-16 10:08:11EST levy.lisp>
;; $Id$
(in-package :gsl)
......@@ -46,11 +46,11 @@
;;; Examples and unit test
(save-test levy
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(levy 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
collect
(levy-skew rng 1.0d0 2.0d0 1.0d0))))
;; Logarithmic distribution
;; Liam Healy, Sat Nov 25 2006 - 16:00
;; Time-stamp: <2008-12-26 19:36:20EST logarithmic.lisp>
;; Time-stamp: <2009-02-16 10:08:16EST logarithmic.lisp>
;; $Id$
(in-package :gsl)
......@@ -27,7 +27,7 @@
;;; Examples and unit test
(save-test logarithmic
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(logarithmic rng 0.9d0)))
......
;; Logistic distribution
;; Liam Healy, Sat Oct 7 2006 - 16:13
;; Time-stamp: <2008-12-26 19:45:34EST logistic.lisp>
;; Time-stamp: <2009-02-16 10:08:10EST logistic.lisp>
;; $Id$
(in-package :gsl)
......@@ -55,7 +55,7 @@
;;; Examples and unit test
(save-test logistic
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(logistic rng 10.0d0)))
......
;; Lognormal distribution
;; Liam Healy, Sat Sep 30 2006
;; Time-stamp: <2008-12-27 10:49:01EST lognormal.lisp>
;; Time-stamp: <2009-02-16 10:08:15EST lognormal.lisp>
;; $Id$
(in-package :gsl)
......@@ -56,7 +56,7 @@
;;; Examples and unit test
(save-test lognormal
(let ((rng (make-random-number-generator *mt19937* 0)))
(let ((rng (make-random-number-generator +mt19937+ 0)))
(loop for i from 0 to 10
collect
(lognormal rng 1.0d0 2.0d0)))
......
;; Multinomial distribution
;; Liam Healy, Sat Nov 25 2006 - 16:00
;; Time-stamp: <2008-12-29 20:56:56EST multinomial.lisp>
;; Time-stamp: <2009-02-16 10:10:33EST multinomial.lisp>
;; $Id$
(in-package :gsl)
......@@ -56,7 +56,7 @@
;;; Examples and unit test
(save-test multinomial
(let ((rng (make-random-number-generator *mt19937* 0))
(let ((rng (make-random-number-generator +mt19937+ 0))
(p #m(0.1d0 0.2d0 0.3d0 0.4d0))
(n (make-marray '(signed-byte 32) :dimensions 4)))
(multinomial rng 8 p n