import { type RandomIntRange } from './random-int.js'; /** * Preset distribution types for random sampling. */ export type DistributionPreset = 'uniform' | 'normal' | 'triangular' | 'right-skewed' | 'left-skewed'; /** * Bimodal distribution configuration with peak positions. */ export type BimodalDistribution = { type: 'bimodal'; /** * Peak positions normalized to [0,1]. * Defaults to [0.25, 0.75] if not specified. */ peaks?: [number, number]; }; /** * Custom distribution configuration with a weight function. */ export type CustomDistribution = { type: 'custom'; /** * Weight function that maps normalized position [0,1] to weight [0,∞). * Higher weight means higher probability. * @param t - Normalized position in range [0,1] * @returns Weight value (should be >= 0) */ weight: (t: number) => number; }; /** * Samples a random integer from the specified distribution within the given range. * When min >= max, returns min regardless of the distribution type. * @param range - Random range specification * @param distribution - Distribution type or custom configuration * @returns A random integer within [min, max) following the distribution, or min when min >= max */ export declare function sampleDistribution(range: RandomIntRange, distribution?: DistributionPreset | BimodalDistribution | CustomDistribution): number;