psteitz 2004/01/11 11:35:23
Modified: math/xdocs/userguide random.xml
Log:
Fixed source formatting.
Revision Changes Path
1.5 +9 -9 jakarta-commons/math/xdocs/userguide/random.xml
Index: random.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/math/xdocs/userguide/random.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- random.xml 15 Nov 2003 18:38:16 -0000 1.4
+++ random.xml 11 Jan 2004 19:35:22 -0000 1.5
@@ -78,36 +78,36 @@
subsequent values in the sequence. For example, the following will generate a
random sequence
of 50 long integers between 1 and 1,000,000, using the current time in
milliseconds as the seed
for the JDK PRNG:
- <pre><code>
+ <source>
RandomDataImpl randomData = new RandomDataImpl();
for (int i = 0; i < 1000; i++) {
value = randomData.nextLong(1, 1000000);
}
- </code></pre>
+ </source>
The following will not in general produce a good random sequence, since the
PRNG is reseeded
each time through the loop with the current time in milliseconds:
- <pre><code>
+ <source>
for (int i = 0; i < 1000; i++) {
RandomDataImpl randomData = new RandomDataImpl();
value = randomData.nextLong(1, 1000000);
}
- </code></pre>
+ </source>
The following will produce the same random sequence each time it is executed:
- <pre><code>
+ <source>
RandomDataImpl randomData = new RandomDataImpl();
randomData.reSeed(1000);
for (int i = 0; i = 1000; i++) {
value = randomData.nextLong(1, 1000000);
}
- </code></pre>
+ </source>
The following will produce a different random sequence each time it is
executed.
- <pre><code>
+ <source>
RandomDataImpl randomData = new RandomDataImpl();
randomData.reSeedSecure(1000);
for (int i = 0; i < 1000; i++) {
value = randomData.nextSecureLong(1, 1000000);
}
- </code></pre>
+ </source>
</dd></dl>
</p>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]