IT++ Logo
Public Member Functions | List of all members
itpp::Random_Generator Class Reference

Base class for random (stochastic) sources. More...

#include <itpp/base/random.h>

Public Member Functions

 Random_Generator ()
 Default constructor.
 
double random_01 ()
 Return a uniformly distributed (0,1) value.
 
double random_01_lclosed ()
 Return a uniformly distributed [0,1) value.
 
double random_01_rclosed ()
 Return a uniformly distributed (0,1] value.
 
uint32_t random_int ()
 Return a uniformly distributed [0, UINT_MAX) value.
 
uint32_t genrand_uint32 ()
 Generate uniform [0, UINT_MAX) integer pseudorandom number.
 
double genrand_close1_open2 ()
 Generate uniform [1, 2) double pseudorandom number.
 
double genrand_close_open ()
 Generate uniform [0, 1) double pseudorandom number.
 
double genrand_open_close ()
 Generate uniform (0, 1] double pseudorandom number.
 
double genrand_open_open ()
 Generate uniform (0, 1) double pseudorandom number.
 

Detailed Description

Base class for random (stochastic) sources.

Random_Generator provides thread-safe generation of pseudo-random numbers

See Also
DSFMT

Definition at line 171 of file random.h.

Member Function Documentation

double itpp::Random_Generator::genrand_close1_open2 ( )
inline

Generate uniform [1, 2) double pseudorandom number.

This function generates and returns double precision pseudorandom number which distributes uniformly in the range [1, 2). This is the primitive and faster than generating numbers in other ranges. init_gen_rand() must be called before this function.

Returns
double precision floating point pseudorandom number

Definition at line 224 of file random.h.

double itpp::Random_Generator::genrand_close_open ( )
inline

Generate uniform [0, 1) double pseudorandom number.

This function generates and returns double precision pseudorandom number which distributes uniformly in the range [0, 1). init_gen_rand() must be called before this function.

Returns
double precision floating point pseudorandom number

Definition at line 234 of file random.h.

Referenced by itpp::Normal_RNG::sample(), and itpp::Gamma_RNG::sample().

double itpp::Random_Generator::genrand_open_close ( )
inline

Generate uniform (0, 1] double pseudorandom number.

This function generates and returns double precision pseudorandom number which distributes uniformly in the range (0, 1]. init_gen_rand() must be called before this function.

Returns
double precision floating point pseudorandom number

Definition at line 244 of file random.h.

Referenced by itpp::Gamma_RNG::sample().

double itpp::Random_Generator::genrand_open_open ( )
inline

Generate uniform (0, 1) double pseudorandom number.

This function generates and returns double precision pseudorandom number which distributes uniformly in the range (0, 1). init_gen_rand() must be called before this function.

Returns
double precision floating point pseudorandom number

Definition at line 254 of file random.h.

Referenced by itpp::Gamma_RNG::sample().


The documentation for this class was generated from the following file:
SourceForge Logo

Generated on Sat Jul 6 2013 10:54:31 for IT++ by Doxygen 1.8.2