Interface ChoiceOptions

The options object for random.choice

interface ChoiceOptions {
    probabilities?: number[];
    replace?: boolean;
    size?: number;
}

Properties

probabilities?: number[]

The probabilities associated with each element. Probabilities should sum to 1 and be the same length as the values. If not specified a uniform distribution is assumed.

replace?: boolean

Weather to replace the chosen element in the pool after each draw

size?: number

number of element to choose