public class DistBernoulli extends DistDiscrete
(c) copyright 2002-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Constructor and Description |
---|
DistBernoulli(StreamInterface stream,
double p)
constructs a new Bernoulli distribution.
|
Modifier and Type | Method and Description |
---|---|
long |
draw()
draws the next value from the Bernoulli distribution.
|
double |
probability(int observation)
returns the propbability of the observation in this particular
distribution.
|
String |
toString() |
public DistBernoulli(StreamInterface stream, double p)
stream
- is the streamp
- the p-value of a Bernoulli distributionpublic long draw()
draw
in class DistDiscrete
public double probability(int observation)
DistDiscrete
probability
in class DistDiscrete
observation
- the discrete observation.#probability(int)
public String toString()
toString
in class Object
Object.toString()
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.