Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
Program defines the UniformRV class. This class generates random numbers which are uniformly distributed in an arbitrary interval (u,v), where u<v. The parameters u and v are specified in the constructor.
The UniformRV class is also quite simple. Given that the RandomNumberGenerator class generates a sequence random numbers uniformly distributed on the interval (0,1), the linear transformation
suffices to produce a sequence of random numbers uniformly distributed on the interval (u,v).