MT Core (C++)
Core library for replacing C++ standard in project usage
|
V-Table for PRNG Designed for having a simple PRNG implementation. More...
#include <random.hpp>
Public Attributes | |
uint64_t(* | nextUint )(PrngState &self) |
Optional Gets the next unsigned int. | |
double(* | next1_0 )(PrngState &self) |
Optional Gets a double d, such that 0 <= d < 1. | |
Result< void, SeedError >(* | seed )(PrngState &self, uint64_t seed) |
Optional Re-seeds the PRNG. | |
void(* | deinit )(PrngState &self) |
Optional Deinitializes the PRNG and frees up any allocated state The PRNG is NOT safe to use after calling deinit! | |
V-Table for PRNG Designed for having a simple PRNG implementation.
For in_range methods to work, at least one of nextUint or next1_0 must be provided For nextUInt and next1_0 to work, need to provide nextUint and next1_0
It's recommended to provide both nextUint and next1_0, but for very simple applications with simple (and consistent) lack of needing both, you can provide only one
Definition at line 69 of file random.hpp.
void(* mtcore::PrngVTable::deinit) (PrngState &self) |
Optional Deinitializes the PRNG and frees up any allocated state The PRNG is NOT safe to use after calling deinit!
Definition at line 93 of file random.hpp.
double(* mtcore::PrngVTable::next1_0) (PrngState &self) |
Optional Gets a double d, such that 0 <= d < 1.
Definition at line 80 of file random.hpp.
uint64_t(* mtcore::PrngVTable::nextUint) (PrngState &self) |
Optional Gets the next unsigned int.
Definition at line 74 of file random.hpp.
Optional Re-seeds the PRNG.
Definition at line 80 of file random.hpp.