|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.randvar.RandomVariateGen umontreal.iro.lecuyer.randvar.RandomVariateGenInt umontreal.iro.lecuyer.randvar.BernoulliGen
public class BernoulliGen
This class implements random variate generators for the
Bernoulli distribution (see class
BernoulliDist
).
Constructor Summary | |
---|---|
BernoulliGen(RandomStream s,
BernoulliDist dist)
Creates a random variate generator for the Bernoulli distribution dist and the random stream s. |
|
BernoulliGen(RandomStream s,
double p)
Creates a Bernoulli random variate generator with parameter p, using stream s. |
Method Summary | |
---|---|
double |
getP()
Returns the parameter p of this object. |
static int |
nextInt(RandomStream s,
double p)
Generates a new integer from the Bernoulli distribution with parameter p = p, using the given stream s. |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGenInt |
---|
getDistribution, nextArrayOfInt, nextInt |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
---|
getStream, nextArrayOfDouble, nextDouble, setStream, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BernoulliGen(RandomStream s, double p)
public BernoulliGen(RandomStream s, BernoulliDist dist)
Method Detail |
---|
public static int nextInt(RandomStream s, double p)
public double getP()
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |