SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.random
Interface RandomNumberGenerator

All Known Subinterfaces:
LinearCongruentialGenerator, RandomLongGenerator
All Known Implementing Classes:
CombinedLinearCongruentialGenerator, Exponential, Gaussian, InverseTransformSampling, LEcuyer, Lehmer, MersenneTwister, MRG, Rayleigh, RNG, StandardGaussian, Uniform, Weibull

public interface RandomNumberGenerator

A (pseudo) random number generator is an algorithm designed to generate a sequence of numbers that lack any pattern.

It is very important to know that the sequence is not random at all and that it is completely determined by a relatively small set of initial values. Knowing the generation algorithm and the states can predict the next value, as the values are generated in a deterministic way.

See Also:

Method Summary
 double nextDouble()
          Get the next random double.
 void seed(long... seeds)
          Seed the random number generator to produce repeatable sequences.
 

Method Detail

seed

void seed(long... seeds)
Seed the random number generator to produce repeatable sequences.

Parameters:
seeds - the seeds

nextDouble

double nextDouble()
Get the next random double.

Returns:
the next random number

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.