A pseudo-random number generator implementation based on std::rand() More...
#include <random.hpp>
Public Member Functions | |
void | seed (unsigned int s) |
Sets the seed of the pseudo-random number generator (std::srand) More... | |
ValueT | operator() () |
Calls std::rand divides by RAND_MAX and casts to ValueT. More... | |
Public Member Functions inherited from viennashe::math::rand_generator_base< double > | |
virtual | ~rand_generator_base () |
virtual double | operator() ()=0 |
The basic random number generator interface (virtual abstract) More... | |
A pseudo-random number generator implementation based on std::rand()
Definition at line 53 of file random.hpp.
|
inlinevirtual |
Calls std::rand divides by RAND_MAX and casts to ValueT.
Implements viennashe::math::rand_generator_base< double >.
Definition at line 66 of file random.hpp.
|
inline |
Sets the seed of the pseudo-random number generator (std::srand)
s | The seed to get reproduceable sequences of numbers |
Definition at line 60 of file random.hpp.