|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
128-bit state for the PCG-XSL-RR 64-bit output generator (Melissa O'Neill). More...
#include <clustering/math/rng.h>
Public Member Functions | |
| void | seed (std::uint64_t seedValue, std::uint64_t stream=0) noexcept |
| Initialize the generator per PCG's canonical seeding procedure. | |
Public Attributes | |
| __uint128_t | m_state = 0 |
128-bit generator state; advanced by every advanceState call. | |
| __uint128_t | m_inc = 0 |
| Stream-encoded odd increment mixed into the LCG step. | |
128-bit state for the PCG-XSL-RR 64-bit output generator (Melissa O'Neill).
State and stream are held as __uint128_t. Seed with seed(seed, stream); advance via the free function advanceState(rng). Reproducibility is load-bearing: the multiplier and output function match pcg-cpp's pcg64 so identical seed + stream produce identical u64 streams across platforms that have __uint128_t.
|
inlinenoexcept |
Initialize the generator per PCG's canonical seeding procedure.
Matches Melissa O'Neill's pcg_basic reference: zero the state, set inc to (stream << 1) | 1, advance once, add the user seed, advance once more.
| seedValue | User-supplied seed mixed into the state after the stream selector. |
| stream | Stream identifier; two generators with identical seed but different streams produce uncorrelated output sequences. |
| __uint128_t clustering::math::pcg64::m_inc = 0 |
| __uint128_t clustering::math::pcg64::m_state = 0 |