MSWS¶
Scalar¶
namespace pxart {
struct msws;
}
Include Scheme¶
#include <pxart/msws.hpp>
Member Types¶
using uint_type = uint64_t;
using result_type = uint32_t;
Member Functions¶
Construction and Seeding¶
constexpr msws();
template <typename RNG>
explicit msws(RNG&& rng);
Generation¶
constexpr result_type operator()() noexcept;
constexpr void jump() noexcept;
constexpr void long_jump() noexcept;
Characteristics¶
static constexpr result_type min() noexcept;
static constexpr result_type max() noexcept;
Example¶
#include <iomanip>
#include <iostream>
#include <random>
//
#include <pxart/msws.hpp>
#include <pxart/uniform.hpp>
using namespace std;
int main() {
// Properly initialize pxart PRNG.
pxart::msws rng{std::random_device{}};
// Print some uniformly distributed random numbers.
for (size_t i = 0; i < 10; ++i)
cout << setw(20) << pxart::uniform<float>(rng) << '\n';
}
Last update: January 18, 2021