Commit e88a5593 authored by Liam Healy's avatar Liam Healy

New function #'mpointer replaces #'generator

New function #'mpointer replaces #'generator for random functions.
parent 8a0ac730
;; 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
......
;; 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)
......
;; 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
......
;; 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,
......
;; 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
......
;; 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
......
;; 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
......
;; 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
......
;; 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
......
;; 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
......
;; 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)
......
;; 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.")
......
;; 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
......
;; 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.")
......
;; 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,
......
;; 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,
......
;; 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
......
;; 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
......
;; 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
......
;; 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
......
;; 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.
......
;; 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
......
;; 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.
......
;; 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
......
;; 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)
......
;; 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
......
;; 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.
......
;; 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.
......
;; 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
......
;; 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
......
;; 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
......
;; 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)
......
;; 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