25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
61 for (
int i = 0; i < n; i++)
73 return convolution(s, n, p);
76 private static int convolution(
RandomStream stream,
int n,
double p) {
78 for (
int i = 0; i < n; i++)
Extends the class DiscreteDistributionInt for the geometric distribution slaw00a (page 322) with par...
static int inverseF(double p, double u)
Computes the inverse of the geometric distribution, given by ( FInvgeom ).
The Pascal distribution is a special case of the negative binomial distribution slaw00a (page 324) w...
PascalConvolutionGen(RandomStream s, PascalDist dist)
Creates a new generator for the distribution dist, using stream s.
PascalConvolutionGen(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.
int nextInt()
Generates a random number (an integer) from the discrete distribution contained in this object.
PascalGen(RandomStream s, int n, double p)
Creates a Pascal random variate generator with parameters and , using stream s.
void setParams(int n, double p)
Sets the parameter and of this object.
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,...