itpp::Random_Generator Class Reference
Base Module » Random Number Generation

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. More...
double | genrand_close_open ()
| Generate uniform [0, 1) double pseudorandom number. More...
double | genrand_open_close ()
| Generate uniform (0, 1] double pseudorandom number. More...
double | genrand_open_open ()
| Generate uniform (0, 1) double pseudorandom number. More...

## 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

## genrand_close1_open2()

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.

## genrand_close_open()

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.

## genrand_open_close()

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.

## genrand_open_open()

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.

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

- itpp/base/random.h

Generated on Sat Sep 30 2017 07:04:09 for IT++ by Doxygen 1.8.13