25package umontreal.ssj.randvar;
27import umontreal.ssj.probdist.BernoulliDist;
28import umontreal.ssj.rng.RandomStream;
79 if (p < 0.0 || p > 1.0)
80 throw new IllegalArgumentException(
"p not in range [0, 1]");
Extends the class DiscreteDistributionInt for the Bernoulli distribution slaw00a with parameter ,...
static int inverseF(double p, double u)
Returns the inverse of the Bernoulli distribution function with parameter at .
BernoulliGen(RandomStream s, BernoulliDist dist)
Creates a random variate generator for the Bernoulli distribution dist and the random stream s.
void setParams(double p)
Sets the parameter of this object.
BernoulliGen(RandomStream s, double p)
Creates a Bernoulli random variate generator with parameter , using stream s.
double getP()
Returns the parameter of this object.
static int nextInt(RandomStream s, double p)
Generates a new integer from the Bernoulli distribution with parameter  p, using the given 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,...