Boost logo

Boost :

Subject: Re: [boost] Low discrepancy sequences (Boost.Random)
From: Justinas V. D. (jvd_at_[hidden])
Date: 2010-03-29 12:19:14


2010.03.29 18:59, Steven Watanabe rašė:
> AMDG
>
> Justinas V. D. wrote:
>> 2010.03.25 23:14, Steven Watanabe rašė:
>>> Justinas V. D. wrote:
>>>> 2010.03.25 19:50, Steven Watanabe rašė:
>>>>>> 2) I am not exactly a Boost.Random guru, so I probably missed some
>>>>>> conceptual requirements, but it works just fine with uniform_01
>>>>>> template (see dim2demo.cpp).
>>>>>
>>>>> A few things that you could add
>>>>> a) non-default seeding.
>>>>> b) stream operators.
>>>>
>>
>> I have uploaded the new version (v2) to Boost Vault. Does the
>> implementation converge to the desirable state?
>
> I didn't look at it very closely, but I have a few notes:
> * bit_count. This appears to be equivalent to std::numeric_limits::digits?

Yes, thank you! I will remove the bit_count<T> cruft.

> * validation is eventually going to die, since it isn't in the standard.
> It will be moved to the tests, since that's the only place that it is used.
> * I'm not sure that the extra constructor/seed overloads are a good idea.
> (Yes, I know I asked for it, but it seems to expose the implementation
> details, and
> I don't think it's all that useful without a corresponding way to get
> the state. The
> rationale that you gave for only having the default constructor seems
> reasonable.)

Yes, will remove them. I do imagine, however, that the user might want
to skip first N vectors in R^Dimension. Not sure if that merits a
special constructor, because its easy to write
for( int i = 0; i < N*Dimension; ++i ) gen(); // skipping values
and specific implementation would not be significantly faster.

>
> There's a fairly decent description of what you need to get
> the toolchain set up at
> https://svn.boost.org/trac/boost/wiki/BoostDocs/GettingStarted
>
Reading up.

J.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk