Alex D Herbert created RNG-109:
----------------------------------
Summary: DiscreteProbabilityCollectionSampler to use an internal
DiscreteSampler
Key: RNG-109
URL: https://issues.apache.org/jira/browse/RNG-109
Project: Commons RNG
Issue Type: Improvement
Components: sampling
Affects Versions: 1.3
Reporter: Alex D Herbert
Assignee: Alex D Herbert
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:
* AliasMethodDiscreteSampler
* GuideTableDiscreteSampler
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)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)