Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTRandUniform<Generator>


RWTRandUniform<Generator>RWTRand<Generator>

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/rand.h>
RWTRandUniform<Generator> gen;

Descripton

Class RWTRandUniform<Generator> generates random numbers from a uniform distribution in an interval [a, b]. The algorithm used to generate the random numbers begins with random numbers generated from a uniform distribution on the interval [0, 1]. Thus, the speed and statistical properties of the uniform number generator may be changed by varying the Generator template parameter responsible for generating the uniformly distributed numbers.

The class Generator must be a function object whose function call operator returns a uniform random double between 0 and 1. The class RWRandGenerator may be used.

Example

Public Constructors

RWTRandUniform();
RWTRandUniform(double a, double b);
RWTRandUniform(const Generator& g, double a = 0, b = 1);
RWTRandUniform(const RWTRandUniform<Generator>& g);

Public Operator

double    operator()()

Public Member Functions

double
highBound() const;
double
lowBound() const;
void
setRange(double a, double b);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.