/** * Minimal TypeScript implementation of the MT19937 32-bit generator described * in Matsumoto & Nishimura (1998) and the public domain C reference. * * Exposes only what the k-means++ seeding routine needs: * • Generation of 32-bit unsigned integers (\[0, 2**32)) * • High-precision uniform floats in the half-open interval \[0, 1) * * Seeding uses the classic `init_genrand` recurrence. NumPy's legacy * `RandomState` instead expands an integer seed through `init_by_array`, so an * identical seed does not reproduce NumPy's stream here — only a deterministic * MT19937 stream of our own. k-means++ requires reproducible randomness, not * NumPy-identical randomness, so this is sufficient. */ export declare class MT19937 { private static readonly N; private static readonly M; private static readonly MATRIX_A; private static readonly UPPER_MASK; private static readonly LOWER_MASK; private mt; private index; constructor(seed: number); next_uint32(): number; /** * Returns a 53-bit precision float in the interval \[0, 1). The two-word * construction (27 high bits + 26 high bits scaled by 1/2**53) is the same * conversion formula NumPy's `random_sample` uses. */ next_float(): number; /** Uniform integer in \[0, max). Uses rejection sampling to discard the * values that would otherwise fold unevenly under the modulo, eliminating * modulo bias. */ next_int(max: number): number; private init; private twist; }