## [Octave-cvsupdate] octave-forge/FIXES rand.cc,1.12,1.13

 [Octave-cvsupdate] octave-forge/FIXES rand.cc,1.12,1.13 From: Paul Kienzle - 2004-10-08 04:35:09 ```Update of /cvsroot/octave/octave-forge/FIXES In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23948 Modified Files: rand.cc Log Message: Document Poisson generator methods and references Index: rand.cc =================================================================== RCS file: /cvsroot/octave/octave-forge/FIXES/rand.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- rand.cc 7 Oct 2004 03:27:31 -0000 1.12 +++ rand.cc 8 Oct 2004 04:34:57 -0000 1.13 @@ -507,9 +507,27 @@ @deftypefn {Loadable Function} {} randp (@var{l})\n\ @deftypefnx {Loadable Function} {} randp (@var{l}, [@var{n}, @var{m}])\n\ @deftypefnx {Loadable Function} {} randp (@var{l}, @var{n}, @var{m})\n\ -Return a matrix with Poisson distributed random elements. The\n\ -arguments are handled the same as the arguments for @code{rand}.\n\ +Return a matrix with Poisson distributed random elements.\n\ +\n\ +Five different algorithms are used depending on the range of @var{l}\n\ +and whether or not @var{l} is a scalar or a matrix.\n\ +\n\ +For scalar @var{l} <= 12, use direct method.[1]\n\n\ +For scalar @var{l} > 12, use rejection method.[1]\n\n\ +For matrix @var{l} <= 10, use inversion method.[2]\n\n\ +For matrix @var{l} > 10, use patchwork rejection method.[2,3]\n\n\ +For @var{l} > 1e8, use normal approximation.[4]\n\ +\n\ +[1] Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.\n\ \n\ +[2] Stadlober E., et al., WinRand source code, available via FTP.\n\ +\n\ +[3] H. Zechner, 'Efficient sampling from continuous and discrete\n\ +unimodal distributions', Doctoral Dissertaion, 156pp., Technical\n\ +University Graz, Austria, 1994.\n\ +\n\ +[4] L. Montanet, et al., 'Review of Particle Properties', Physical Review\n\ +D 50 p1284, 1994\n\ @end deftypefn\n\ @seealso{rand, randn, rande}\n") { ```

 [Octave-cvsupdate] octave-forge/FIXES rand.cc,1.12,1.13 From: Paul Kienzle - 2004-10-08 04:35:09 ```Update of /cvsroot/octave/octave-forge/FIXES In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23948 Modified Files: rand.cc Log Message: Document Poisson generator methods and references Index: rand.cc =================================================================== RCS file: /cvsroot/octave/octave-forge/FIXES/rand.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- rand.cc 7 Oct 2004 03:27:31 -0000 1.12 +++ rand.cc 8 Oct 2004 04:34:57 -0000 1.13 @@ -507,9 +507,27 @@ @deftypefn {Loadable Function} {} randp (@var{l})\n\ @deftypefnx {Loadable Function} {} randp (@var{l}, [@var{n}, @var{m}])\n\ @deftypefnx {Loadable Function} {} randp (@var{l}, @var{n}, @var{m})\n\ -Return a matrix with Poisson distributed random elements. The\n\ -arguments are handled the same as the arguments for @code{rand}.\n\ +Return a matrix with Poisson distributed random elements.\n\ +\n\ +Five different algorithms are used depending on the range of @var{l}\n\ +and whether or not @var{l} is a scalar or a matrix.\n\ +\n\ +For scalar @var{l} <= 12, use direct method.[1]\n\n\ +For scalar @var{l} > 12, use rejection method.[1]\n\n\ +For matrix @var{l} <= 10, use inversion method.[2]\n\n\ +For matrix @var{l} > 10, use patchwork rejection method.[2,3]\n\n\ +For @var{l} > 1e8, use normal approximation.[4]\n\ +\n\ +[1] Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.\n\ \n\ +[2] Stadlober E., et al., WinRand source code, available via FTP.\n\ +\n\ +[3] H. Zechner, 'Efficient sampling from continuous and discrete\n\ +unimodal distributions', Doctoral Dissertaion, 156pp., Technical\n\ +University Graz, Austria, 1994.\n\ +\n\ +[4] L. Montanet, et al., 'Review of Particle Properties', Physical Review\n\ +D 50 p1284, 1994\n\ @end deftypefn\n\ @seealso{rand, randn, rande}\n") { ```