Overview
Solutions
Detailed Features
Documentation
QuickStart Samples
Sample Applications
Downloads
Get it now!
Download trial version
How to Buy
Testimonials

"The de facto-standard library for linear algebra on the .NET platform is the Extreme Optimization Library."
  - Jon Harrop, author, F# for Scientists

"I have yet to see another package that offers the depth of statistical analysis that Extreme Optimization does, and I must say that I'm impressed with the level of service I've experienced."
  - Henry Oh, RBC Capital Markets

"I have made it my mission to institutionalize the value of good API design.  I strongly believe that this is key to making developers more productive and happy on our platform. It is clear that you value good API design in your work, and take to heart developer productivity and synergy with the .NET framework."
- Brad Abrams,
Lead Program Manager, Microsoft.

More testimonials

New Version 8.1!

Supports .NET 6.0. Try it for free with our fully functional 60-day trial version.

Get from Nuget

Solutions

Random Numbers

Whether you're using C#, Visual Basic (VB.NET), F#, IronPython, the Extreme Optimization Numerical Libraries for .NET make it easy to make use of random numbers in your .NET applications. The Extreme Optimization Numerical Libraries for .NET are a complete math, vector/matrix and statistics package for the Microsoft .NET framework. Features specifically related to random numbers include:

  • Compatible with the .NET Framework's System.Random.
  • Extended with many convenience functions.
  • Four generators, with varying quality, period and speed to suit your application.
  • Generate random samples from any distribution.
  • More than 30 discrete, continuous and multivariate probability distributions.
  • Generate sets of correlated random numbers from any set of distributions.
  • Shufflers and randomized enumerators
  • Fauré and Halton quasi-random sequences.

It is well known that the random number generator built into the .NET framework has some deficiencies. With the random number generators in the Extreme Optimization Numerical Libraries for .NET, you can generate high quality random numbers fast.

Random Number Classes

The classes that implement random numbers live in the Extreme.Statistics.Random namespace.

Random Number Generators

See the Random Numbers section of the Statistics Library User's Guide for detailed explanations.

  • ExtendedRandom Extends the functionality of the built-in System.Random.
  • MersenneTwister Represents a pseudo-random number generator based on the Mersenne Twister algorithm.
  • GfsrGenerator Represents a generalized feedback shift register pseudo-random number generator.
  • RanLux Represents a RanLux pseudo-random number generator.
  • RanLux24 Represents a RanLux 24bit pseudo-random number generator.
  • CorrelatedRandomNumberGenerator Represents a random number generator that produces correlated random variables.

Probability Distributions

The random number generators can generate random numbers from any distribution. The distribution objects themselves also have methods to generate random variates. The following distributions are available:

For more on these distributions see the sections on Continuous, Discrete, and Multivariate distributions in the Statistics Library User's Guide for detailed explanations.

Random Numbers QuickStart Samples

Our library comes with a large number of QuickStart samples that help you to get started in minutes. The following samples illustrate how to use the random numbers:

Project Description View source
RandomNumberGenerators Illustrates the use of classes that implement pseudo-random number generators. C# VB.NET
NonUniformRandomNumbers Illustrates ways of obtaining random numbers from a non-uniform distribution. C# VB.NET
QuasiRandom Illustrates the use of quasi-random sequences in multi-dimensional numerical integration. C# VB.NET

Trial version

If you would like to evaluate the Extreme Optimization Numerical Libraries for .NET, you can download a free, fully functional 60-day trial version. In addition to the code samples discussed here, it includes about 70 other samples as well as complete documentation for the entire library.