{"push_id":3160810673,"size":1,"distinct_size":1,"ref":"refs/heads/devel","head":"58f728ac6b2121489cf7b508c6782c811fc18121","before":"e1d5356ae9fe0e289cc6fe21fec486c54f89400a","commits":[{"sha":"58f728ac6b2121489cf7b508c6782c811fc18121","author":{"name":"Charles Blake","email":"85d56cb41a65761dcea36d0ceb2f0ec45f184419@cblake.net"},"message":"Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ?\nCDF is a standard ident in all things related to random numbers/sampling,\nand full words \"cumulativeDistributionFunction\" would be silly long, in\nthis case, IMO.  We use lowercase `cdf` to make it not look like a type,\nremove all looping from `sample` letting callers do it.  Besides just\nside-stepping any `sampleSize` name choice, callers may want to filter\nout samples anyway which this makes slightly simpler.\n\nAlso add two variants of `cumsum`, value return and in-place update\ndistinguished by the var-ness of the first argument.  Add tests for\n`int` and `float` for both `cumsum` and the new `sample`.  (The sample\ntests exercise the value return mode of `cumsum`.)\n\nFunctionality pre-this-PR `sample(a, w)` is now the almost as simple\n`for i in 0..<n: sample(a, w.cumsum)`, but this new code factoring is\nalmost surely better.  The statistical tests pass, as before.","distinct":true,"url":"https://api.github.com/repos/c-blake/Nim/commits/58f728ac6b2121489cf7b508c6782c811fc18121"}]}
{"actor":{"display_login":"c-blake"}}