java.lang.Object
AbstractContinousDistribution
org.mrd.random.Bernoulli
- public class Bernoulli
- extends AbstractContinousDistribution
Constructs a Bernoulli Trial with the given successProbability, using a
cern.jet.random.engine.MersenneTwister seeded with the given seed.
- Version:
- 0.1
|
Constructor Summary |
Bernoulli(double p,
int seed)
Constructs a Bernoulli Trial with the given successProbability, using a cern.jet.random.engine.MersenneTwister seeded with the given seed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
successProbability
protected double successProbability
Bernoulli
public Bernoulli(double p,
int seed)
- Constructs a Bernoulli Trial with the given successProbability, using a
cern.jet.random.engine.MersenneTwister seeded with the given seed.
nextInt
public int nextInt()
nextBoolean
public boolean nextBoolean()
- Returns a uniformly distributed random boolean.
nextDouble
public double nextDouble()
setSuccessProbability
public void setSuccessProbability(double successProbability)
throws java.lang.IndexOutOfBoundsException
- Returns a Bernoulli with the propability of success equal to
successProbability.
getSuccessProbability
public double getSuccessProbability()