Mir Random [WIP]
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 23 05:03:04 PST 2016
On Wednesday, 23 November 2016 at 11:44:44 UTC, Joseph Rushton
Wakeling wrote:
> Yes, most uses of RNGs in std.random involve calling `front`
> and then `popFront()` (although it would probably be better the
> other way round). But it's readily possible to imagine
> range-based use-cases for random distributions along the lines
> of,
>
> myRNG.normalDistribution(0.0, 5.0).filter!(a => a >
> 0).somethingElse.take(20);
>
> But what I'd say more broadly is that of what I've seen so far,
> mir.random is conflating too many breaking changes without
> giving thought for their impact (for example, converting the
> `isUniformRNG` check to rely on a UDA is IMO problematic; I can
> file a GitHub issue explaining the reasons for this). Allowing
> for the wider goals of the exercise, it could be worth giving
> some thought to which of these breakages is really needed to
> support your use-cases, and which can be avoided.
Added RandomRangeAdaptor for URBGs:
https://github.com/libmir/mir-random/blob/master/source/random/algorithm.d
More information about the Digitalmars-d
mailing list