diff src/DLD-FUNCTIONS/rand.cc @ 9064:7c02ec148a3c

Check grammar on all .cc files Same check as previously done on .m files Attempt to enforce some conformity in documentation text for rules such as two spaces after a period, commas around latin abbreviations, etc.
author Rik <rdrider0-list@yahoo.com>
date Sat, 28 Mar 2009 13:57:22 -0700
parents 853f96e8008f
children 610bf90fce2a
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/rand.cc	Mon Mar 30 19:48:56 2009 -0400
+++ b/src/DLD-FUNCTIONS/rand.cc	Sat Mar 28 13:57:22 2009 -0700
@@ -324,7 +324,7 @@
 v = rand (\"state\")\n\
 @end example\n\
 \n\
-This returns a column vector @var{v} of length 625. Later, you can\n\
+This returns a column vector @var{v} of length 625.  Later, you can\n\
 restore the random number generator to the state @var{v}\n\
 using the form\n\
 \n\
@@ -363,7 +363,7 @@
 rand (\"seed\", val)\n\
 @end example\n\
 \n\
-which sets the seed of the generator to @var{val}. The seed of the\n\
+which sets the seed of the generator to @var{val}.  The seed of the\n\
 generator can be queried with\n\
 \n\
 @example\n\
@@ -636,8 +636,10 @@
 @end example\n\
 @item @code{beta (a, b)} for @code{a > -1}, @code{b > -1}\n\
 @example\n\
+@group\n\
 r1 = randg (a, 1)\n\
 r = r1 / (r1 + randg (b, 1))\n\
+@end group\n\
 @end example\n\
 @item @code{Erlang (a, n)}\n\
 @example\n\
@@ -668,14 +670,18 @@
 @item non-central @code{chisq (df, L)}, for @code{df >= 0} and @code{L > 0}\n\
 (use chisq if @code{L = 0})\n\
 @example\n\
+@group\n\
 r = randp (L / 2)\n\
 r(r > 0) = 2 * randg (r(r > 0))\n\
 r(df > 0) += 2 * randg (df(df > 0)/2)\n\
+@end group\n\
 @end example\n\
 @item @code{Dirichlet (a1, @dots{} ak)}\n\
 @example\n\
+@group\n\
 r = (randg (a1), @dots{}, randg (ak))\n\
 r = r / sum (r)\n\
+@end group\n\
 @end example\n\
 @end table\n\
 @seealso{rand, randn, rande, randp}\n\
@@ -869,7 +875,7 @@
 @deftypefnx {Loadable Function} {} randp (@var{l}, @var{n}, @var{m})\n\
 @deftypefnx {Loadable Function} {} randp (\"state\", @var{x})\n\
 @deftypefnx {Loadable Function} {} randp (\"seed\", @var{x})\n\
-Return a matrix with Poisson distributed random elements with mean value parameter given by the first argument, @var{l}. The arguments\n\
+Return a matrix with Poisson distributed random elements with mean value parameter given by the first argument, @var{l}.  The arguments\n\
 are handled the same as the arguments for @code{rand}, except for the\n\
 argument @var{l}.\n\
 \n\