I want to generate a random sample from an array of objects using an array of weighted values for each object. I have somewhat of a solution, but I\'m not certain this is th