Topic: Issues with <random>
Author: Steven Watanabe <watanabesj@gmail.com>
Date: Thu, 24 Jun 2010 12:20:22 CST Raw View
I've just been looking over the sections on random
numbers in n3090, and there were a few things I
found a little odd.
Why do the requirements for seed sequence include
everything in seed_seq? I don't see why an Engine
needs to require anything except the generate
function. Is there something I'm missing?
The seeding of subtract_with_carry_engine specifies UIntType
as the template parameter of linear_congruential_engine.
This requires that UIntType be at least 32 bits wide,
even though this requirement is not explicitly imposed
by subtract_with_carry_engine.
Random number adapter requirements states that the
equality operators return true if and only if the adaptees are
equal. This is not correct for discard_block_engine,
since two generators also have to have equal n's to
be equal.
For seed_seq, step b of the algorithm for generate uses
a variable x. "increment begin[x + q] by r2." I can't
find any definition of x, so I assume from the context
that it is supposed to be k.
In Christ,
Steven Watanabe
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]