public class PascalConvolutionGen extends PascalGen
The algorithm is slow if n is large.
| Constructor and Description |
|---|
PascalConvolutionGen(RandomStream s,
int n,
double p)
Creates a Pascal random variate generator with parameters
n and p, using stream s.
|
PascalConvolutionGen(RandomStream s,
PascalDist dist)
Creates a new generator for the distribution dist, using
stream s.
|
| Modifier and Type | Method and Description |
|---|---|
int |
nextInt()
Generates a random number (an integer) from the discrete
distribution contained in this object.
|
static int |
nextInt(RandomStream s,
int n,
double p) |
getDistribution, nextArrayOfIntgetStream, nextArrayOfDouble, nextDouble, setStreampublic PascalConvolutionGen(RandomStream s, int n, double p)
public PascalConvolutionGen(RandomStream s, PascalDist dist)
public int nextInt()
RandomVariateGenIntnextInt in class RandomVariateGenIntpublic static int nextInt(RandomStream s, int n, double p)
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.