|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjhplot.math.num.random.AbstractDiscreteRandomVariable
jhplot.math.num.random.BernoulliRandomVariable
public class BernoulliRandomVariable
A random variable generator for the Bernoulli distribution.
References:
| Constructor Summary | |
|---|---|
BernoulliRandomVariable()
Default constructor. |
|
BernoulliRandomVariable(double p)
Create a random variable with the given probability of success. |
|
BernoulliRandomVariable(double p,
RNG source)
Create a random variable with the given probability of success and source generator. |
|
| Method Summary | |
|---|---|
int |
nextRandomVariable()
Access the next random variable from this generator. |
static int |
nextRandomVariable(double p,
RNG source)
Access the next random variable using the given generator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BernoulliRandomVariable()
public BernoulliRandomVariable(double p)
p - the probability of success.
public BernoulliRandomVariable(double p,
RNG source)
p - the probability of success.source - the source generator.| Method Detail |
|---|
public static int nextRandomVariable(double p,
RNG source)
p - the probability of success.source - the source generator.
public int nextRandomVariable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||