swarm.random
Interface BernoulliDist
- All Known Implementing Classes:
- BernoulliDistImpl
- public interface BernoulliDist
- extends BooleanDistribution, BooleanDistributionS
Bernoulli Distribution .
A distribution returning YES with a given probability.
Method Summary |
double |
getProbability()
The getProbability method returns the probability of returning YES. |
boolean |
getSampleWithProbability(double p)
The getSampleWithProbability: returns a sample YES or NO value. |
Methods inherited from interface swarm.defobj.Drop |
drop |
Methods inherited from interface swarm.defobj.DefinedObject |
compare,
describe,
describeID,
getDisplayName,
getTypeName,
getZone,
perform,
perform$with,
perform$with$with,
perform$with$with$with,
respondsTo,
setDisplayName,
xfprint,
xfprintid,
xprint,
xprintid |
getProbability
public double getProbability()
- The getProbability method returns the probability of returning YES.
getSampleWithProbability
public boolean getSampleWithProbability(double p)
- The getSampleWithProbability: returns a sample YES or NO value.