|
libstdc++
|
#include <random>
Public Types | |
| using | result_type |
Public Member Functions | |
| template<typename _Sseq> requires __is_seed_seq<_Sseq> | |
| philox_engine (_Sseq &__q) | |
| philox_engine (result_type __value) | |
| void | discard (unsigned long long __z) |
| result_type | operator() () |
| template<typename _Sseq> requires __is_seed_seq<_Sseq> | |
| void | seed (_Sseq &__q) |
| void | seed (result_type __value=default_seed) |
| void | set_counter (const array< result_type, __n > &__counter) |
Static Public Member Functions | |
| static constexpr result_type | max () |
| static constexpr result_type | min () |
Static Public Attributes | |
| static constexpr result_type | default_seed |
| static constexpr array< result_type, __n/2 > | multipliers |
| static constexpr array< result_type, __n/2 > | round_consts |
| static constexpr size_t | round_count |
| static constexpr size_t | word_count |
| static constexpr size_t | word_size |
Friends | |
| template<typename _CharT, typename _Traits> | |
| basic_ostream< _CharT, _Traits > & | operator<< (basic_ostream< _CharT, _Traits > &__os, const philox_engine &__x) |
| bool | operator== (const philox_engine &, const philox_engine &)=default |
| template<typename _CharT, typename _Traits> | |
| basic_istream< _CharT, _Traits > & | operator>> (basic_istream< _CharT, _Traits > &__is, philox_engine &__x) |
A discrete pseudorandom number generator with weak cryptographic properties.
This algorithm was designed to be used for highly parallel random number generation, and is capable of immensely long periods. It provides "Crush-resistance", denoting an ability to pass the TestU01 Suite's "Big Crush" test, demonstrating significant apparent entropy.
It is not intended for cryptographic use and should not be used for such, despite being based on cryptographic primitives.
The typedefs philox4x32 and philox4x64 are provided as suitable defaults for most use cases, providing high-quality random numbers with reasonable performance.
This algorithm was created by John Salmon, Mark Moraes, Ron Dror, and David Shaw as a product of D.E. Shaw Research.
| __w | Word size |
| __n | Buffer size |
| __r | Rounds |
| __consts | Multiplication and round constant pack, ordered as M_{0}, C_{0}, M_{1}, C_{1}, ... , M_{N/2-1}, C_{N/2-1} |
| using std::philox_engine< _UIntType, __w, __n, __r, __consts >::result_type |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlinestaticconstexpr |
The maximum value that this engine can return.
Definition at line 2103 of file random.h.
Referenced by std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::operator>>, and std::philox_engine< uint_fast32_t, 32, 4, 10, 0xCD9E8D57, 0x9E3779B9, 0xD2511F53, 0xBB67AE85 >::set_counter().
|
inlinestaticconstexpr |
|
inline |
| void std::philox_engine< _UIntType, __w, __n, __r, __consts >::seed | ( | _Sseq & | __q | ) |
seeds philox_engine by seed sequence
| __q | the seed sequence |
Definition at line 1016 of file bits/random.tcc.
References std::max().
|
inline |
|
inline |
|
friend |
|
friend |
compares two philox_engine objects
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |