Example #1
0
 /// <summary>
 /// Fills an array with samples generated from the distribution.
 /// </summary>
 /// <param name="values">The array to fill with the samples.</param>
 /// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
 /// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>
 /// <returns>a sequence of samples from the distribution.</returns>
 public static void Samples(double[] values, int shape, double rate)
 {
     Gamma.Samples(values, shape, rate);
 }
Example #2
0
 /// <summary>
 /// Fills an array with samples generated from the distribution.
 /// </summary>
 /// <param name="rnd">The random number generator to use.</param>
 /// <param name="values">The array to fill with the samples.</param>
 /// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
 /// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>
 /// <returns>a sequence of samples from the distribution.</returns>
 public static void Samples(System.Random rnd, double[] values, int shape, double rate)
 {
     Gamma.Samples(rnd, values, shape, rate);
 }
Example #3
0
 /// <summary>
 /// Generates a sequence of samples from the distribution.
 /// </summary>
 /// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
 /// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>
 /// <returns>a sequence of samples from the distribution.</returns>
 public static IEnumerable <double> Samples(int shape, double rate)
 {
     return(Gamma.Samples(shape, rate));
 }
Example #4
0
 /// <summary>
 /// Generates a sequence of samples from the distribution.
 /// </summary>
 /// <param name="rnd">The random number generator to use.</param>
 /// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
 /// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>
 /// <returns>a sequence of samples from the distribution.</returns>
 public static IEnumerable <double> Samples(System.Random rnd, int shape, double rate)
 {
     return(Gamma.Samples(rnd, shape, rate));
 }