randomly Select
Randomly select an element from the array
Return
the randomly selected value
Parameters
array
the array to select from, must not be empty
Randomly selects from the array using the supplied cdf
Return
the randomly selected value
Parameters
array
array to select from
cdf
the cumulative probability associated with each element of array