Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTRandExponential<Generator>


RWTRandExponential<Generator>RWTRand<Generator>

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

Synopsis

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

Descripton

Class RWTRandExponential<Generator> generates random numbers from an exponential distribution:

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 exponentially distributed random numbers may be changed by varying the Generator template parameter responsible for generating these 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 supplied with the library may be used.

Example

Public Constructors

RWTRandExponential(double lam=1);
RWTRandExponential(const Generator& g, double lam=1);
RWTRandExponential(const RWTRandExponential<Generator>& g);

Public Operator

double    operator()()

Public Member Functions

double
highBound() const;
lamda() const;
double
lowBound() const;
void
setLambda(double l);


Previous fileTop of DocumentContentsIndexNext file

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