import { Question, Section } from './exam_components'; export declare class SeededRandomizer { private rng; constructor(seed: string); /** * @returns A random floating point number between 0 (inclusive) and 1 (exclusive). */ float(): number; /** * @returns A random integer between 0 (inclusive) and n (exclusive). */ range(n: number): number; /** * An old method for randomly choosing one element from an array. Does not * produce behavior consistent with `chooseN(choices, 1)`. * @deprecated Do not use in new code. Use `chooseOne(choices)` instead. */ legacyChooseOne(choices: readonly T[]): T; /** * @requires `choices` is non-empty. * @returns One of the elements of `choices`, selected randomly. */ chooseOne(choices: readonly T[]): T; /** * Randomly selects `n` elements from `choices` (repetition is not allowed). * @requires `choices` is non-empty and `n` is less than or equal to the length of `choices`. * @returns An array of `n` elements from `choices`, selected randomly. */ chooseN(choices: readonly T[], n: number): readonly T[]; shuffle(original: readonly T[]): T[]; } export type Randomizer = SeededRandomizer; export declare function createSectionChoiceRandomizer(student_randomization_seed: string): SeededRandomizer; export declare function createQuestionChoiceRandomizer(student_randomization_seed: string, section: Section): SeededRandomizer; export declare function createSectionSkinRandomizer(student_randomization_seed: string, section: Section): SeededRandomizer; export declare function createQuestionSkinRandomizer(student_randomization_seed: string, question: Question): SeededRandomizer;