tenzr::random::PRNGKey¶
Functional pseudo-random key formed by two 32-bit words.
#include <prng_key.h>
Public Functions¶
| Name | |
|---|---|
| PRNGKey() =default | |
| PRNGKey(uint64_t seed_val) | |
| PRNGKey(uint32_t k0_val, uint32_t k1_val) | |
| PRNGKey(const Array & arr) | |
| Array | ToArray() const |
| uint64_t | ToU64() const |
| bool | operator==(const PRNGKey & other) const |
| bool | operator!=(const PRNGKey & other) const |
Public Attributes¶
| Name | |
|---|---|
| uint32_t | k0 |
| uint32_t | k1 |
Public Functions Documentation¶
function PRNGKey¶
function PRNGKey¶
function PRNGKey¶
function PRNGKey¶
Parameters:
- arr Array whose first two elements supply k0 and k1.
Construct a key from a two-element integer array.
function ToArray¶
Return:
- The key as a length-2 UInt32 array.
- Array holding {k0, k1}.
Export the key as a uint32[2] array.
function ToU64¶
Return: The key packed into a single 64-bit integer.