public
Description: Random number generation for common lisp
Homepage: http://code.google.com/p/cl-randist/
Clone URL: git://github.com/lvaruzza/cl-randist.git
Search Repo:
Add documentation in random-chi-square
lvaruzza (author)
Sat Feb 23 20:34:24 -0800 2008
commit  48f06320bb46539104d2ebd5ebd4b88bb58ccbc8
tree    6ffeae7dec7e41d13077c55469c0bdf69cb48690
parent  8265ea59c0a955a1916c4e751f1b503510082a14
...
20
21
22
 
 
 
 
23
24
...
20
21
22
23
24
25
26
27
28
0
@@ -20,5 +20,9 @@
0
    (inline random-chi-square))
0
 
0
 (defun random-chi-square (nu)
0
+ "Generate random variable for chi square distribution:
0
+
0
+p(x) dx = (1/(2*Gamma(nu/2))) (x/2)^(nu/2 - 1) exp(-x/2) dx"
0
+
0
   (declare (type double-float nu))
0
   (* 2d0 (random-gamma (/ nu 2d0))))

Comments

    No one has commented yet.