25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
87 if (p < 0.0 || p > 1.0)
88 throw new IllegalArgumentException(
"p not in [0, 1]");
90 throw new IllegalArgumentException(
"n <= 0");
static int inverseF(double n, double p, double u)
Computes the inverse function without precomputing tables.
The Pascal distribution is a special case of the negative binomial distribution slaw00a (page 324) w...
double getP()
Returns the parameter of this object.
PascalGen(RandomStream s, int n, double p)
Creates a Pascal random variate generator with parameters and , using stream s.
static int nextInt(RandomStream s, int n, double p)
Generates a new variate from the Pascal distribution, with parameters  n and  p,...
void setParams(int n, double p)
Sets the parameter and of this object.
int getN()
Returns the parameter of this object.
PascalGen(RandomStream s, PascalDist 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,...