/** * Core random generator engine class to use to build * custom random generator engines. */ export default class RandomEngine { /** * Include minimum during random data generation * ***(include by default)***. * * @default true */ static DEFAULT_INCLUDE_MINIMUM: boolean; /** * Include maximum during random data generation * ***(exclude by default)***. * * @default false */ static DEFAULT_INCLUDE_MAXIMUM: boolean; /** * The default minimum for random float generation * ***(inclusive by default)***. * * @default 0 */ static DEFAULT_FLOAT_MINIMUM: number; /** * The default maximum for random float generation * ***(exclusive by default)***. * * @default 1 */ static DEFAULT_FLOAT_MAXIMUM: number; /** * The default minimum for random integer generation * ***(inclusive by default)***. * * @default 0 */ static DEFAULT_INTEGER_MINIMUM: number; /** * The default maximum **(2^32)** for random integer generation * ***(exclusive by default)***. * * @default 4294967296 */ static DEFAULT_INTEGER_MAXIMUM: number; /** * The default minimum for random bigint generation * ***(inclusive by default)***. * * @default 0n */ static DEFAULT_BIGINT_MINIMUM: bigint; /** * The default maximum **(2^64)** for random bigint generation * ***(exclusive by default)***. * * @default 18446744073709551616n */ static DEFAULT_BIGINT_MAXIMUM: bigint; private readonly _name; constructor(name: string); protected _next(): number; get name(): string; nextBoolean(): boolean; nextInteger(min?: number, max?: number, includeMin?: boolean, includeMax?: boolean): number; nextFloat(min?: number, max?: number, includeMin?: boolean, includeMax?: boolean): number; nextBigInt(min?: bigint, max?: bigint, includeMin?: boolean, includeMax?: boolean): bigint; nextString(length: number, charset: string): string; /** * Randomly returns an element determined by the weights. * * @param elements The elements to choose one from. * @param weights The weights of each elements. * @returns The random chosen element. */ nextWeighted(elements: ArrayLike, weights: number[]): T; pickArray(array: ArrayLike): T; /** * Shuffles the array **in place** by randomizing its elements using the * modern version of the ***Fisher–Yates algorithm by Richard Durstenfeld***. * * @param array The array to shuffle **in place**. * * @link https://en.wikipedia.org/wiki/Fisher-Yates_shuffle#The_modern_algorithm */ shuffleArray(array: T[]): void; }