Classes | |
class | RandomGenerator |
Class for a random number generator. More... | |
class | RandomGeneratorBase |
class to wrap the C++11 random number generator/distribution More... | |
Enumerations | |
enum class | RandomEngine { LINEAR , MERSENNE } |
Random number engine. More... | |
enum class | RandomDistribution { NORMAL , UNIFORM } |
Functions | |
std::string | get_name (RandomEngine e) |
std::string | get_name (RandomDistribution d) |
template<typename real_t > | |
std::unique_ptr< RandomGeneratorBase< real_t > > | make_random_generator (std::size_t seed, RandomEngine e, RandomDistribution d) |
template<typename real_t > | |
std::unique_ptr< RandomGeneratorBase< real_t > > | make_random_generator (RandomEngine e, RandomDistribution d) |
template<typename real_t > | |
std::unique_ptr< RandomGeneratorBase< real_t > > | make_default_random_generator (std::size_t seed=0) |
Namespace containing simple wrappers around the C++11 random number generators and distributions.
|
strong |
|
strong |
|
inline |
Return a short string (name) for the random number distribution.
d | random distribution |
|
inline |
Return a short string (name) for the random engine.
e | random engine |
std::unique_ptr< RandomGeneratorBase< real_t > > strumpack::random::make_default_random_generator | ( | std::size_t | seed = 0 | ) |
Factory method to construct a RandomGeneratorBase with the default engine and distribution.
real_t | float or double |
seed | seed for the gererator |
std::unique_ptr< RandomGeneratorBase< real_t > > strumpack::random::make_random_generator | ( | RandomEngine | e, |
RandomDistribution | d | ||
) |
Factory method to construct a RandomGeneratorBase with a specified random engine and random distribution, using seed 0.
real_t | float or double |
seed | seed for the gererator |
e | random engine |
d | random distribution |
std::unique_ptr< RandomGeneratorBase< real_t > > strumpack::random::make_random_generator | ( | std::size_t | seed, |
RandomEngine | e, | ||
RandomDistribution | d | ||
) |
Factory method to construct a RandomGeneratorBase with a specified random engine and random distribution, with seed s.
real_t | float or double |
seed | seed for the gererator |
e | random engine |
d | random distribution |