/** * In-place Fisher–Yates shuffle of `arr`. * Uses `Math.random()`; tests should stub `Math.random` for determinism. * @param arr Array to shuffle (mutated) * @returns The shuffled array (same reference) */ export declare function shuffle(arr: T[]): T[]; /** * Draw `k` unique samples without replacement from `arr`. * If `k` >= arr.length a shallow copy is returned. Uses `Math.random()`. * @param arr Source array * @param k Number of samples to draw * @returns Array of sampled elements */ export declare function sample(arr: T[], k: number): T[]; /** * Draw `k` bootstrap samples (with replacement) from `arr`. * Uses `Math.random()`; tests should stub `Math.random` for determinism. * @param arr Source array * @param k Number of draws * @returns Array of sampled elements (with replacement) */ export declare function bootstrap(arr: T[], k: number): T[];