Beispiel #1
0
 /**
  * Generates a new integer from the *Bernoulli* distribution with parameter @f$p = @f$ `p`,
  * using the given stream `s`.
  */
 public static int nextInt(RandomStream s, double p) {
   return BernoulliDist.inverseF(p, s.nextDouble());
 }