|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.random.distribution.Uniform
public class Uniform
A pseudo uniform random number generator generates numbers within the unit interval in such a way that there are equal probabilities of them falling in the same length sub-interval.
Sampling from the unit interval is the most basic building block of most pseudo random number generation algorithms.
Note that the numbers generated are in [0, 1].
| Nested Class Summary | |
|---|---|
static class |
Uniform.Method
the different pseudo uniform random number generators available |
| Field Summary | |
|---|---|
Uniform.Method |
method
the sampling algorithm |
| Constructor Summary | |
|---|---|
Uniform()
Construct a Mersenne Twister pseudo uniform random number generator. |
|
Uniform(Uniform.Method method)
Construct a pseudo uniform random number generator. |
|
| Method Summary | |
|---|---|
double |
nextDouble()
Get the next random double between 0 and 1. |
long |
nextLong()
Get the next random long. |
void |
seed(long... seeds)
Seed the random number generator to produce repeatable sequences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Uniform.Method method
| Constructor Detail |
|---|
public Uniform(Uniform.Method method)
method - the algorithm to usepublic Uniform()
| Method Detail |
|---|
public void seed(long... seeds)
RandomNumberGenerator
seed in interface RandomNumberGeneratorseeds - the seedspublic double nextDouble()
nextDouble in interface RandomNumberGeneratorpublic long nextLong()
RandomLongGeneratorlong.
nextLong in interface RandomLongGeneratorlong
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||