Пример #1
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());
 }
Пример #2
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());
 }