Example #1
0
 /** Uses inversion to generate a new JohnsonSL variate, using stream `s`. */
 public static double nextDouble(
     RandomStream s, double gamma, double delta, double xi, double lambda) {
   return JohnsonSLDist.inverseF(gamma, delta, xi, lambda, s.nextDouble());
 }
Example #2
0
 /**
  * Generates a variate from the normal distribution with parameters
  *
  * @f$\mu= @f$ `mu` and @f$\sigma= @f$ `sigma`, using stream `s`.
  */
 public static double nextDouble(RandomStream s, double mu, double sigma) {
   return NormalDist.inverseF(mu, sigma, s.nextDouble());
 }
Example #3
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());
 }