Class for a random number generator. More...
#include <RandomWrapper.hpp>
Public Member Functions | |
RandomGenerator () | |
RandomGenerator (std::size_t s) | |
void | seed (std::size_t s) |
void | seed (std::seed_seq &s) |
void | seed (std::uint32_t i, std::uint32_t j) |
real_t | get () |
real_t | get (std::uint32_t i, std::uint32_t j) |
int | flops_per_prng () |
Class for a random number generator.
real_t | float or double |
E | the random number engine: std::mt19937 or std::minstd_rand |
D | the random number distribution: std::uniform_real_distribution or std::normal_distribution |
|
inline |
Default constructor, using seed 0.
|
inline |
Constructor using seed s.
|
inlinevirtual |
Return the (approximate) number of flops required to generate a random number.
Implements strumpack::random::RandomGeneratorBase< real_t >.
|
inlinevirtual |
get the next random element.
Implements strumpack::random::RandomGeneratorBase< real_t >.
|
inlinevirtual |
Get a (reproducible) element for a specific 2d point.
Implements strumpack::random::RandomGeneratorBase< real_t >.
|
inlinevirtual |
Seed with a seed sequence.
Implements strumpack::random::RandomGeneratorBase< real_t >.
|
inlinevirtual |
Seed with value s.
Implements strumpack::random::RandomGeneratorBase< real_t >.
|
inlinevirtual |
Seed with two values (for instance 2 coordinates, point in a matrix). Can be used to get reproducible (pseudo-random) matrix elements.
Implements strumpack::random::RandomGeneratorBase< real_t >.