public class PascalGen extends RandomVariateGenInt
NegativeBinomialGen for a description.| Constructor and Description |
|---|
PascalGen(RandomStream s,
int n,
double p)
Creates a Pascal random variate generator with parameters n and p,
using stream s.
|
PascalGen(RandomStream s,
PascalDist dist)
Creates a new generator for the distribution dist, using
stream s.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getN()
Returns the parameter n of this object.
|
double |
getP()
Returns the parameter p of this object.
|
static int |
nextInt(RandomStream s,
int n,
double p)
Generates a new variate from the Pascal distribution,
with parameters n = n and p = p, using stream s.
|
getDistribution, nextArrayOfInt, nextIntgetStream, nextArrayOfDouble, nextDouble, setStreampublic PascalGen(RandomStream s, int n, double p)
public PascalGen(RandomStream s, PascalDist dist)
public static int nextInt(RandomStream s, int n, double p)
public int getN()
public double getP()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.