Chapter 9. Random Number Generators (.NET, C#, CSharp, VB, Visual Basic, F#)
NMath provides random number generators that generate random deviates from a variety of probability distributions, including the beta, binomial, Cauchy, exponential, gamma, geometric, Gumbel, Johnson, Laplace, log-normal, normal, Pareto, Poisson, Rayleigh, triangular, uniform, and Weibull distributions.
NMath provides two sets of random number generators:
● Scalar random number generators, which generate random deviates one at a time, via the Next() method. All NMath scalar generators inherit from the abstract base class RandomNumberGenerator, providing a common interface.
● Vectorized random number generators, which yield a stream of random numbers. Vectorized random number generators generally outperform scalar generators in computations requiring multiple deviates. All NMath scalar generators implement the IRandomNumberDistribution interface, and use a RandomNumberStream.
This chapter describes how to use the random number generator classes.