Пример #1
0
 /// <summary>
 /// Generate a sample sequence by sampling a function at samples from a probability distribution, uniform between 0 and 1.
 /// Faster than other methods but with reduced guarantees on randomness.
 /// </summary>
 public static IEnumerable <T> UniformMapSequence <T>(Func <double, T> map)
 {
     return(SystemRandomSource.DoubleSequence().Select(map));
 }
Пример #2
0
 /// <summary>
 /// Create an infinite random sample sequence, uniform between 0 and 1.
 /// Faster than other methods but with reduced guarantees on randomness.
 /// </summary>
 public static IEnumerable <double> UniformSequence()
 {
     return(SystemRandomSource.DoubleSequence());
 }