In file mydocsrc/iml_rand.h:

class uniform_rv : public scalar_rv

This class produces the interface for a user-accesible uniform random variable

Inheritance:

uniform_rv < scalar_rv


Public Methods

void reset (float Mean, float SDev)
Here is the required over-ride for the reset() interface function
double sample (void)
Here is the required over-ride for the sample() interface function
virtual void seed (long Seed)
Returns a value in the range 0 to 1
void set_min_max (float Min, float Max)
Set the distribution end points
uniform_rv (float Min = 1e-30, float Max = 1 - 1e-30)
We only a need a single constructor.
void use_FSULTRA (void)
Select the FSULTRA unit-uniform random number generator
void use_MT19937B (void)
Select Matsumoto's MERSENNE TWISTER unit-uniform random number generator

Inherited from scalar_rv:


Documentation

This class produces the interface for a user-accesible uniform random variable. The class contains a pointer to a unit_uniform_rv object, plus instances of each type of specific unit_uniform_rv (child classes derived from unit_uniform_rv). Configuring use of any specific type requires a member function call. The default constructor produces a uniform random variable over (0, 0.99999999999999) But the object can be configured to have any endpoints representable by single precision floating point.

virtual void seed(long Seed)
Returns a value in the range 0 to 1.

void reset(float Mean, float SDev)
Here is the required over-ride for the reset() interface function. It configures the mean and standard deviation of the uniform random varible. These numbers are translated into distribution end points.

void set_min_max(float Min, float Max)
Set the distribution end points. This is an alternative to setting the mean and standard deviation, since that is less intuitive for a uniform distribution.


Direct child classes:
gaussian_rv
exponential_rv

alphabetic index hierarchy of classes


generated by doc++