FPL Statistics Group





Random Number Generation Java Package

Currently (as of 4/12/04) this package contains Java methods that permit a user to generate Uniform(0,1) or Normal(0,1) random numbers. These methods are translations of FORTRAN programs written in the 1980's by James Blue, David Kahaner, and George Marsaglia.

If you are aware of high quality random number generation routines recently written in Java, I would appreciate hearing about them. Please e-mail me (Steve Verrill) at sverrill@fs.fed.us.

Warning!!!

DISCLAIMER OF WARRANTIES

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE AUTHOR/TRANSLATOR DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE SOFTWARE OR DOCUMENTATION IN TERMS OF THEIR CORRECTNESS, RELIABILITY, CURRENTNESS, OR OTHERWISE. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. IN NO CASE WILL ANY PARTY INVOLVED WITH THE CREATION OR DISTRIBUTION OF THE SOFTWARE BE LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF THIS SOFTWARE.

Sorry about that.

Documentation

Here is the documentation generated by javadoc. Also see the source code of the routines. The source code includes a copy of the original FORTRAN documentation.

Installation

The code comes in five files:

  1. Uniform.java
  2. Normal.java
  3. UniformTest.java
  4. NormalTest.java
  5. Console.java

Given the manner in which the routines are currently written, you will need to import them (see, for example, the beginning of UniformTest.java). The classes will have to be placed in subdirectories of a directory in your CLASSPATH. The Uniform and Normal classes will have to be placed in a subdirectory called rannum. Console.class will have to be placed in a subdirectory called corejava. Alternatively, you could remove the rannum and corejava package and import statements in the source code, and compile all of the necessary files in the same directory.

Console.java

Console.java is software described in Cornell and Horstmann's Core Java (SunSoft Press/Prentice-Hall). (I like this book.) It may be used for non-commerical purposes. I only make use of it in the testing routines.

Support

If you have questions about this software, or suggestions for improvement, please contact me at sverrill@fs.fed.us or 608-231-9375.
[Forest Service] [Forest Products Lab] [FPL Statistics Group]


Last modified on 4/12/04.

As of last midnight, this page had been accessed times.