public class BooleanDistribution extends UnivariateDistribution
name
Constructor and Description |
---|
BooleanDistribution(java.lang.String name,
double massTrue,
double massFalse)
Generates a boolean distribution based on two mass points,
generating the corresponding numbers proportionally to these
|
Modifier and Type | Method and Description |
---|---|
double |
draw()
Returns 1.0 (true) or 0.0 (false) proportionally to the
mass at the point encoding these
|
double |
getMassFalse() |
double |
getMassTrue() |
getName, toString
public BooleanDistribution(java.lang.String name, double massTrue, double massFalse)
name
- The name of the boolean distribution (will be prefixed by BooleanDistribution_)massTrue
- The mass concentrated at the point representing 'true'massFalse
- The mass concentrated at the point representing 'false'public double getMassTrue()
public double getMassFalse()
public double draw()
draw
in class UnivariateDistribution