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