Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Math Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWTRandPoisson<Generator>

Module:  Essential Math    Group:  Statistics classes


RWTRandPoisson<Generator>RWTRand<Generator>

Local Index

Members

Synopsis

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

Description

Class RWTRandPoisson<Generator> generates random numbers from a Poisson distribution:

where µ is the mean. 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 Poisson random number generator may be varied by varying the Generator template parameter, which is 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 supplied with the library may be used.

Example

Public Constructors

RWTRandPoisson();
RWTRandPoisson(double m=1);
RWTRandPoisson(const Generator& g, double m=1);
RWTRandPoisson(const RWTRandPoisson<Generator>& g);

Public Operator

double    operator()();
size_t operator()(double* out, size_t n);

Public Member Functions

double
mean() const;
void
setMean(double m);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.