|
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.Gaussian
public class Gaussian
Sample pseudo random numbers from the Normal distribution.
| Nested Class Summary | |
|---|---|
static class |
Gaussian.Method
the methods available to sample from the Normal distribution |
| Field Summary | |
|---|---|
double |
mu
the mean |
double |
sigma
the standard deviation |
| Constructor Summary | |
|---|---|
Gaussian(double mu,
double sigma)
Construct a pseudo-random number generator of a Gaussian distribution using the Box-Muller method. |
|
Gaussian(double mu,
double sigma,
Gaussian.Method method,
RandomNumberGenerator rng)
Construct a pseudo-random number generator of a Gaussian distribution. |
|
| Method Summary | |
|---|---|
double |
nextDouble()
Get the next Gaussian sample. |
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 double mu
public final double sigma
| Constructor Detail |
|---|
public Gaussian(double mu,
double sigma,
Gaussian.Method method,
RandomNumberGenerator rng)
mu - the meansigma - the standard deviationmethod - the sampling methodrng - a uniform random number generator
public Gaussian(double mu,
double sigma)
mu - the meansigma - the standard deviation| Method Detail |
|---|
public void seed(long... seeds)
RandomNumberGenerator
seed in interface RandomNumberGeneratorseeds - the seedspublic double nextDouble()
This method is synchronized so that one call generates two random samples.
nextDouble in interface RandomNumberGenerator
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||