[
https://issues.apache.org/jira/browse/RNG-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Herbert resolved RNG-202.
------------------------------
Fix Version/s: 1.8
Assignee: Alex Herbert
Resolution: Implemented
Updated documentation in commit:
934e7e4120eafb1982b43b75029b4463b9d7be18
> Scaling factors in GuideTableDiscreteSampler and AliasMethodDiscreteSampler
> allow very large memory allocation
> --------------------------------------------------------------------------------------------------------------
>
> Key: RNG-202
> URL: https://issues.apache.org/jira/browse/RNG-202
> Project: Commons RNG
> Issue Type: Improvement
> Components: sampling
> Affects Versions: 1.7
> Reporter: Alex Herbert
> Assignee: Alex Herbert
> Priority: Trivial
> Fix For: 1.8
>
>
> The GuideTableDiscreteSampler and AliasMethodDiscreteSampler sample an
> enumerated distribution of {{n}} categories defined by probabilities.
> The GuideTableDiscreteSampler allocates a guide table of length {{n *
> alpha}}, where {{alpha}} is a scaling factor.
> The AliasMethodDiscreteSampler allocates alias tables using the size {{n}}.
> The input probabilities may be padded using a factor {{alpha}} to increase
> the table size by 2^alpha and then rounded to the next power of 2.
> In both samplers there is no limit on the increase in size made by the
> scaling factor. This allows construction to be bounded by the maximum memory
> allocation of an array.
> Issue identified using a security scan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)