An array of tuples, each tuple being an option of type T and its weight. (The weights don't have to add up to 1.0, they are normalized internally.)
A random value between 0.0 and 1.0 that you can provide with any random number generator of your choice.
The chosen option.
A useful function to randomly choose an option from a list of options, each option having a weight.