Exemple #1
0
 static double SampleUnchecked(System.Random rnd, double mu, double sigma)
 {
     return(Math.Exp(Normal.SampleUnchecked(rnd, mu, sigma)));
 }
Exemple #2
0
 /// <summary>
 /// Generates a sample from the log-normal distribution using the <i>Box-Muller</i> algorithm.
 /// </summary>
 /// <returns>a sample from the distribution.</returns>
 public double Sample()
 {
     return(Math.Exp(Normal.SampleUnchecked(RandomSource, _mu, _sigma)));
 }