ViSP  2.6.2
vpUniRand Class Reference

#include <vpNoise.h>

+ Inheritance diagram for vpUniRand:

Public Member Functions

 vpUniRand (const long seed=0)
 
double operator() ()
 

Protected Member Functions

double draw1 ()
 
void init ()
 

Protected Attributes

long x
 

Detailed Description

Class for generating random numbers with uniform probability density.

The algorithms and notations used are described in Random Number Generation and Monte Carlo Methods James E. Gentle, Springer 1998

Definition at line 72 of file vpNoise.h.

Constructor & Destructor Documentation

vpUniRand::vpUniRand ( const long  seed = 0)
inline

Definition at line 100 of file vpNoise.h.

Member Function Documentation

double vpUniRand::draw1 ( )
protected

Bays-Durham Shuffling of Park-Miller generator.

Minimal random number generator of Park and Miller with Bays-Durham shuffle. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of the endpoint values).

Definition at line 83 of file vpNoise.cpp.

References x.

void vpUniRand::init ( )
inlineprotected

Definition at line 88 of file vpNoise.h.

Referenced by vpGaussRand::vpGaussRand().

double vpUniRand::operator() ( )
inline

Definition at line 104 of file vpNoise.h.

Member Data Documentation

long vpUniRand::x
protected

Definition at line 86 of file vpNoise.h.

Referenced by draw1(), vpGaussRand::seed(), and vpGaussRand::vpGaussRand().