Mercurial > octave
diff src/DLD-FUNCTIONS/rand.cc @ 10791:3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
interpreter/doccheck: New directory for spelling/grammar scripts.
interpreter/doccheck/README: Instructions for using scripts.
interpreter/doccheck/spellcheck: Script to spellcheck a Texinfo file.
interpreter/doccheck/aspell.conf: GNU Aspell configuration file for
Octave documentation.
interpreter/doccheck/aspell-octave.en.pws: Private Aspell dictionary.
interpreter/doccheck/add_to_aspell_dict: Script to add new
Octave-specific words to
private Aspell dictionary.
interpreter/octave.texi: New @nospell macro which forces Aspell
to ignore the word marked by the macro.
interpreter/mk_doc_cache.m: Skip new @nospell macro when building
doc_cache.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 17 Jul 2010 19:53:01 -0700 |
parents | ac433932ce23 |
children | 89f4d7e294cc |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/rand.cc Thu Jul 15 12:15:14 2010 +0200 +++ b/src/DLD-FUNCTIONS/rand.cc Sat Jul 17 19:53:01 2010 -0700 @@ -358,13 +358,14 @@ value of @var{v}, not @var{v} itself.\n\ \n\ By default, the generator is initialized from @code{/dev/urandom} if it is\n\ -available, otherwise from cpu time, wall clock time and the current\n\ +available, otherwise from CPU time, wall clock time and the current\n\ fraction of a second.\n\ \n\ To compute the pseudo-random sequence, @code{rand} uses the Mersenne\n\ Twister with a period of @math{2^{19937}-1} (See M. Matsumoto and T. Nishimura,\n\ -@cite{Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator}, ACM Trans. on\n\ -Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 1998,\n\ +@cite{Mersenne Twister: A 623-dimensionally equidistributed uniform \n\ +pseudorandom number generator}, ACM Trans. on\n\ +Modeling and Computer Simulation Vol. 8, No. 1, pp. 3-30, January 1998,\n\ @url{http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html}).\n\ Do @strong{not} use for cryptography without securely hashing\n\ several returned values together, otherwise the generator state\n\ @@ -502,9 +503,11 @@ elements having zero mean and variance one. The arguments are\n\ handled the same as the arguments for @code{rand}.\n\ \n\ -By default, @code{randn} uses the Marsaglia and Tsang ``Ziggurat technique'' to\n\ -transform from a uniform to a normal distribution. (G. Marsaglia and\n\ -W.W. Tsang, @cite{Ziggurat method for generating random variables},\n\ +By default, @code{randn} uses the Marsaglia and Tsang ``Ziggurat technique''\n\ +to transform from a uniform to a normal distribution.\n\ +\n\ +Reference: G. Marsaglia and W.W. Tsang,\n\ +@cite{Ziggurat Method for Generating Random Variables},\n\ J. Statistical Software, vol 5, 2000,\n\ @url{http://www.jstatsoft.org/v05/i08/})\n\ \n\ @@ -562,11 +565,14 @@ Return a matrix with exponentially distributed random elements. The\n\ arguments are handled the same as the arguments for @code{rand}.\n\ \n\ -By default, @code{rande} uses the Marsaglia and Tsang ``Ziggurat technique'' to\n\ -transform from a uniform to a exponential distribution. (G. Marsaglia and\n\ -W.W. Tsang, @cite{Ziggurat method for generating random variables},\n\ +By default, @code{randn} uses the Marsaglia and Tsang ``Ziggurat technique''\n\ +to transform from a uniform to a exponential distribution.\n\ +\n\ +Reference: G. Marsaglia and W.W. Tsang,\n\ +@cite{Ziggurat Method for Generating Random Variables},\n\ J. Statistical Software, vol 5, 2000,\n\ @url{http://www.jstatsoft.org/v05/i08/})\n\ +\n\ @seealso{rand, randn, randg, randp}\n\ @end deftypefn") { @@ -866,19 +872,19 @@ \n\ @table @asis\n\ @item For scalar @var{l} <= 12, use direct method.\n\ -Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.\n\ +W.H. Press, et al., @cite{Numerical Recipes in C}, Cambridge University Press, 1992.\n\ @item For scalar @var{l} > 12, use rejection method.[1]\n\ -Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.\n\ +W.H. Press, et al., @cite{Numerical Recipes in C}, Cambridge University Press, 1992.\n\ @item For matrix @var{l} <= 10, use inversion method.[2]\n\ -Stadlober E., et al., WinRand source code, available via FTP.\n\ +E. Stadlober, et al., WinRand source code, available via FTP.\n\ @item For matrix @var{l} > 10, use patchwork rejection method.\n\ -Stadlober E., et al., WinRand source code, available via FTP, or\n\ -H. Zechner, 'Efficient sampling from continuous and discrete\n\ -unimodal distributions', Doctoral Dissertation, 156pp., Technical\n\ +E. Stadlober, et al., WinRand source code, available via FTP, or\n\ +H. Zechner, @cite{Efficient sampling from continuous and discrete\n\ +unimodal distributions}, Doctoral Dissertation, 156pp., Technical\n\ University Graz, Austria, 1994.\n\ @item For @var{l} > 1e8, use normal approximation.\n\ -L. Montanet, et al., 'Review of Particle Properties', Physical Review\n\ -D 50 p1284, 1994\n\ +L. Montanet, et al., @cite{Review of Particle Properties}, Physical Review\n\ +D 50 p1284, 1994.\n\ @end table\n\ @seealso{rand, randn, rande, randg}\n\ @end deftypefn") @@ -987,8 +993,8 @@ @deftypefnx {Loadable Function} {} randperm (@var{n}, @var{m})\n\ Return a row vector containing a random permutation of @code{1:@var{n}}.\n\ If @var{m} is supplied, return @var{m} permutations,\n\ -one in each row of a NxM matrix. The complexity is O(M*N) in both time and\n\ -memory. The randomization is performed using rand().\n\ +one in each row of a @nospell{NxM} matrix. The complexity is O(M*N) in both\n\ +time and memory. The randomization is performed using rand().\n\ All permutations are equally likely.\n\ @seealso{perms}\n\ @end deftypefn")