Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-12-21 11:44:20

On Dec 14, 2003, at 9:51 PM, Beman Dawes wrote:

> At 03:02 PM 12/14/2003, Matthias Troyer wrote:
> >>Please don't forget the boost.random documentation. The current html
> >files are completely out of date since July's changes.
> Hum... Jens told me that the changes he made in late October and early
> November updated the docs to match the TR interface. Is that not
> correct?

You are partially right - after doing another update I realized that
the documentation has improved, but either the changes Jens made to the
documentation are not complete, or there is a bug in the library. Two
examples are the issues I reported in July and where I was told by
other Boosters that the interface has changed and that my codes no
longer comply with the new interface. Now that the documentation is
here it seems that my codes are valid according to the current
documentation but still do not work properly. The two examples are:

On Jul 25, 2003, at 2:51 PM, Matthias Troyer wrote:
> Here is a test program that fails to compile now:
> #include <boost/random.hpp>
> int main()
> {
> boost::lagged_fibonacci607 rng;
> boost::uniform_int<> int_rng(0,3);
> int x = int_rng(rng);
> }

On Jul 25, 2003, at 7:14 PM, Matthias Troyer wrote:

> Dear Boosters, dear Jens,
> After some debugging I realized another bug in the new version of the
> Boost random number library. uniform_real has the following
> operator():
> result_type operator()(Engine& eng) { return eng() * (_max - _min) +
> _min; }
> This does not work if the underlying engine does not give random
> numbers in an interval other than [0,1), and thus fails with all of
> the integer based engines in the Boost random library. I

According to the documentation the operator() of the distributions take
a UniformRandomNumberGenerator as argument and the codes should thus be
correct. I guess that the documentation is incorrect here.

Another issue with distributions is that in
libs/random/random-distributions.html the synopsis reads, e.g.:

template<class UniformRandomNumberGenerator, class IntType = int>
   class uniform_int;

but further down the class is defined as
template<class IntType = int>
class uniform_int

I thus guess that the documentation is only partially updated to the
new version. Since we use the library on a daily basis it would be
great to have complete documentation for this very useful library. The
incomplete documentation on distributions makes it hard to add
additional distributions, and makes it very hard for people to
understand the library. I would appreciate seeing the documentation
fixed before the 1.31 release.

Best regards


Boost list run by bdawes at, gregod at, cpdaniel at, john at