java -jar test_distributions.jar
to execute.javadoc
or browse it directly.
![]() |
![]() | ||||
Bernoulli's | Binomial | ||||
![]() |
![]() |
![]() | |||
geometric | Pascal's | Poisson's | |||
// This example use the Bernoulli class, the constructor of which allows to set the parameters. // The range of these parameters is checked (here 0<prob<1). // The ParameterException is raised if prob is not valid. // Once a Bernoulli object has been instanciated, // the user just needs to call the long sample() method. |
// This example, calls the long bernoulli(double prob) method of the Distributions class. // In that example, the parameters are not checked. An undefined behaviour is obtained when // defining bad parameters (e.g. a probability must be positive and less than 1. |
import eduni.distributions.Bernoulli; |
import eduni.distributions.Distributions; |