commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [7/9] commons-rng git commit: Expand "overview" page (web site).
Date Fri, 16 Sep 2016 20:55:40 GMT
Expand "overview" page (web site).

As requested by Emmanuel Bourg.


Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/c1baba2e
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/c1baba2e
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/c1baba2e

Branch: refs/heads/1.0-release
Commit: c1baba2ebce449a6ebde68abde393a684b896c2b
Parents: e533176
Author: Gilles <erans@apache.org>
Authored: Thu Sep 15 18:03:52 2016 +0200
Committer: Gilles <erans@apache.org>
Committed: Thu Sep 15 18:03:52 2016 +0200

----------------------------------------------------------------------
 src/site/xdoc/index.xml | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/c1baba2e/src/site/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index cadd8ec..dabc77e 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -27,7 +27,27 @@
 
     <section name="Apache Commons RNG: Random Numbers Generators" href="summary">
       <p>
-        Commons RNG provides implementations of pseudo-random numbers generators.
+        Commons RNG provides implementations of pseudo-random numbers generators that are
+        either faster or of higher quality (and sometimes both) than <code>java.lang.Random</code>.
+      </p>
+
+      <p>
+        Casual use is as simple as:
+
+<source>import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.RandomSource;
+
+// Instantiate a "Mersenne-Twister" generator with a factory method.
+UniformRandomProvider rng = RandomSource.create(RandomSource.MT);
+
+// Use it to produce a floating-point value between 0 and 1.
+double random = rng.nextDouble();
+</source>
+
+      </p>
+
+      <p>
+        For more examples and more advanced usage, see the <a href="userguide/rng.html">userguide</a>.
       </p>
     </section>
 


Mime
View raw message