25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
47 protected double gamma;
97 if (p < 0.0 || p > 1.0)
98 throw new IllegalArgumentException(
"p not in [0, 1]");
100 throw new IllegalArgumentException(
"gamma <= 0");
Extends the class DiscreteDistributionInt for the negative binomial distribution slaw00a (page 324) ...
static int inverseF(double n, double p, double u)
Computes the inverse function without precomputing tables.
double getP()
Returns the parameter of this object.
void setParams(double gamma, double p)
Sets the parameter and of this object.
NegativeBinomialGen(RandomStream s, double gamma, double p)
Creates a negative binomial random variate generator with parameters.
double getGamma()
Returns the parameter 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,...
NegativeBinomialGen(RandomStream s, NegativeBinomialDist dist)
Creates a new generator for the distribution dist, using stream s.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
double nextDouble()
Returns a (pseudo)random number from the uniform distribution over the interval , using this stream,...