|
Boost : |
Subject: Re: [boost] [random] new threefry random engine
From: Thijs (M.A.) van den Berg (thijs_at_[hidden])
Date: 2014-05-02 14:32:36
> AMDG
>
> On 05/02/2014 06:49 AM, Thijs van den Berg wrote:
>>
>> The counter_based_engine design Iâm working on (Iâll share an example soon) works with 3 type of random function:
>
> This is much too complicated. There should be
> exactly one kind of RandomFunction. Either pass
> the key always, and make it empty when it isn't
> needed, or store the key in the random function
> and never pass it.
>
> In Christ,
> Steven Watanabe
>
From a performance point of view the only option will probably be to never pass instead of always. If we give a random function the same seed interface like a random engine for setting the key then a random function will look a lot like a random engine. If will fill an external output buffer based on scrambling an external input buffer.
The counter engine adaptor / wrapper will
* own the input and output container
* manipulate the input container as a counter
* forwards the seeding directly to the random function
* use the output container as a source for generating samples
Would this work for the function in random 123?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk