/** * Python random module for TypeScript * * Provides random number generation functions matching Python's random module, * including choice, shuffle, sample, and various distributions. * * @see {@link https://docs.python.org/3/library/random.html | Python random documentation} * @module */ /** Return a random floating point number in the range [0.0, 1.0) */ declare function random(): number; /** Return a random floating point number N such that a <= N <= b */ declare function uniform(a: number, b: number): number; /** Return a random integer N such that a <= N <= b (inclusive) */ declare function randInt(a: number, b: number): number; /** Return a randomly selected element from range(start, stop, step) */ declare function randRange(start: number, stop?: number, step?: number): number; /** Return a random element from the non-empty sequence */ declare function choice(seq: T[] | string): T | string; /** Return a k-length list of elements chosen from the population with replacement */ declare function choices(population: T[], options?: { weights?: number[]; k?: number; }): T[]; /** Return a k-length list of unique elements chosen from the population (without replacement) */ declare function sample(population: T[], k: number): T[]; /** Shuffle the sequence in place */ declare function shuffle(x: unknown[]): void; /** Gaussian distribution with mean mu and standard deviation sigma */ declare function gauss(mu?: number, sigma?: number): number; /** Normal distribution (alias for gauss) */ declare const normalVariate: typeof gauss; /** Triangular distribution with low, high, and mode */ declare function triangular(low?: number, high?: number, mode?: number): number; /** Beta distribution with alpha and beta parameters */ declare function betaVariate(alpha: number, beta: number): number; /** Exponential distribution with mean 1/lambd */ declare function expoVariate(lambd: number): number; /** Gamma distribution with shape alpha and scale beta */ declare function gammaVariate(alpha: number, beta: number): number; /** Log normal distribution */ declare function logNormVariate(mu: number, sigma: number): number; /** Von Mises distribution (circular data) */ declare function vonMisesVariate(mu: number, kappa: number): number; /** Pareto distribution */ declare function paretoVariate(alpha: number): number; /** Weibull distribution */ declare function weibullVariate(alpha: number, beta: number): number; declare const randomModule_betaVariate: typeof betaVariate; declare const randomModule_choice: typeof choice; declare const randomModule_choices: typeof choices; declare const randomModule_expoVariate: typeof expoVariate; declare const randomModule_gammaVariate: typeof gammaVariate; declare const randomModule_gauss: typeof gauss; declare const randomModule_logNormVariate: typeof logNormVariate; declare const randomModule_normalVariate: typeof normalVariate; declare const randomModule_paretoVariate: typeof paretoVariate; declare const randomModule_randInt: typeof randInt; declare const randomModule_randRange: typeof randRange; declare const randomModule_random: typeof random; declare const randomModule_sample: typeof sample; declare const randomModule_shuffle: typeof shuffle; declare const randomModule_triangular: typeof triangular; declare const randomModule_uniform: typeof uniform; declare const randomModule_vonMisesVariate: typeof vonMisesVariate; declare const randomModule_weibullVariate: typeof weibullVariate; declare namespace randomModule { export { randomModule_betaVariate as betaVariate, randomModule_choice as choice, randomModule_choices as choices, randomModule_expoVariate as expoVariate, randomModule_gammaVariate as gammaVariate, randomModule_gauss as gauss, randomModule_logNormVariate as logNormVariate, randomModule_normalVariate as normalVariate, randomModule_paretoVariate as paretoVariate, randomModule_randInt as randInt, randomModule_randRange as randRange, randomModule_random as random, randomModule_sample as sample, randomModule_shuffle as shuffle, randomModule_triangular as triangular, randomModule_uniform as uniform, randomModule_vonMisesVariate as vonMisesVariate, randomModule_weibullVariate as weibullVariate }; } export { choices as a, betaVariate as b, choice as c, gauss as d, expoVariate as e, randInt as f, gammaVariate as g, randRange as h, random as i, shuffle as j, logNormVariate as l, normalVariate as n, paretoVariate as p, randomModule as r, sample as s, triangular as t, uniform as u, vonMisesVariate as v, weibullVariate as w };