The DiscreteProbabilityCollectionSampler builds a cumulative probability distribution from an input of items and their associated probabilities. This is sampled using a binary search (O(log n) time).
The library now contains DiscreteSamplers that can sample efficiently (approaching O(1) time) from a cumulative probability distribution:
Test these samplers to determine which is appropriate to use as the algorithm behind the DiscreteProbabilityCollectionSampler. The test should include:
- Construction time
- Sample time
- A range of distributions (uniform, linear ramp, Poisson, Geometric, BiModal, TriModel, Random scatter)