Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
clustering::math::xoshiro256ss Struct Reference

256-bit state for Vigna & Blackman's xoshiro256** generator. More...

#include <clustering/math/rng.h>

Collaboration diagram for clustering::math::xoshiro256ss:
[legend]

Public Member Functions

void seed (std::uint64_t seedValue) noexcept
 Initialize the four state words via SplitMix64 diffusion of a single 64-bit seed.

Public Attributes

std::array< std::uint64_t, 4 > m_s {0, 0, 0, 0}
 Four 64-bit state words; SplitMix64-diffused at seed time.

Detailed Description

256-bit state for Vigna & Blackman's xoshiro256** generator.

Seed with seed(seedValue) (SplitMix64-diffused); advance via advanceState(rng). The canonical s={0,0,0,0} state is a fixed point, so seed always routes through SplitMix64 even for seedValue == 0.

Definition at line 80 of file rng.h.

Member Function Documentation

◆ seed()

void clustering::math::xoshiro256ss::seed ( std::uint64_t seedValue)
inlinenoexcept

Initialize the four state words via SplitMix64 diffusion of a single 64-bit seed.

SplitMix64's avalanche ensures every state word is well-mixed even when the user supplies a small-integer seed like 0 or 1. Reference: https://prng.di.unimi.it/splitmix64.c.

Parameters
seedValueThe 64-bit seed word.

Definition at line 92 of file rng.h.

Member Data Documentation

◆ m_s

std::array<std::uint64_t, 4> clustering::math::xoshiro256ss::m_s {0, 0, 0, 0}

Four 64-bit state words; SplitMix64-diffused at seed time.

Definition at line 82 of file rng.h.


The documentation for this struct was generated from the following file:
  • include/clustering/math/rng.h