| <?xml version="1.0"?> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <document> |
| |
| <properties> |
| <title>Commons RNG</title> |
| </properties> |
| |
| <body> |
| |
| <section name="Apache Commons RNG: Random Numbers Generators" href="summary"> |
| <p> |
| Commons RNG provides implementations of pseudo-random numbers generators that are |
| either faster or of higher quality (and sometimes both) than <code>java.util.Random</code>. |
| </p> |
| |
| <p> |
| Casual use is as simple as: |
| |
| <source>import org.apache.commons.rng.UniformRandomProvider; |
| import org.apache.commons.rng.simple.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> |
| |
| <p> |
| Commons RNG is intended to be a repository of pure Java implementations of |
| random number generators that produce deterministic sequences. |
| The current design has made no provision for features generally needed for |
| cryptography applications (e.g. strong unpredictability). |
| </p> |
| |
| <p> |
| The emphasis is on state-of-the-art generators that pass stringent uniformity |
| tests such as <a href="http://simul.iro.umontreal.ca/testu01/tu01.html">TU01</a> |
| and <a href="http://www.phy.duke.edu/~rgb/General/dieharder.php">Dieharder</a>. |
| Weaker algorithms, with known shortcomings, are also provided (for reference or |
| due to their historical importance) but their use is best avoided in new |
| applications. |
| </p> |
| </section> |
| |
| <section name="Download Apache Commons RNG"> |
| <subsection name="Releases"> |
| <p> |
| Download the |
| <a href="http://commons.apache.org/rng/download_rng.cgi"> |
| latest release</a> of Apache Commons RNG. |
| </p> |
| </subsection> |
| </section> |
| |
| </body> |
| |
| </document> |