Random Class
public class Random
This language is not supported or no code example is available.
public ref class Random
This language is not supported or no code example is available.
Name | Description | |
---|---|---|
Binomial(int, double) | Generates a random integer N according to the binomial law | |
Gaus() | Return random distributed following a gaussian with (0, 1) | |
Gaus(double, double) | Return rundom number distributed following a gaussian with mean and sigma | |
Poisson(double) | Generates random integer N according to Poisson law. | |
Rndm() | Generate uniformely distributed random number between 0 and 1 |
Use static methods of this class to generate random number distributed uniformely or
according to binomial, gaussian, poisson, etc. laws
Console.WriteLine("Uniform distribution:"); Console.WriteLine("{0:F2}", TRandom.Rndm()); Console.WriteLine("Gauss distribution:"); Console.WriteLine("{0:F2}", TRandom.Gaus(0, 1)); Console.WriteLine("Binomial distribution:"); Console.WriteLine("{0}", TRandom.Binomial(100, 0.5)); Console.WriteLine("Poisson distribution:"); Console.WriteLine("{0}", TRandom.Poisson(100));