Data Structures and Algorithms with Object-Oriented Design Patterns in C#
next up previous contents index

Uniformly Distributed Random Variables

Program gif 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.

   program33854
Program: UniformRV class.

The UniformRV class is also quite simple. Given that the RandomNumberGenerator class generates a sequence random numbers tex2html_wrap_inline68434 uniformly distributed on the interval (0,1), the linear transformation

displaymath68424

suffices to produce a sequence of random numbers tex2html_wrap_inline68438 uniformly distributed on the interval (u,v).


next up previous contents index

Bruno Copyright © 2001 by Bruno R. Preiss, P.Eng. All rights reserved.