27 Feb
2009
27 Feb
'09
9:16 p.m.
AMDG James Madison wrote:
Thanks for the reply, I tried implementing your suggestion of using a pair of iterators, but I think that I might be misinterpreting the source, and that it is still only using a 32-bit seed.
From looking at the source, the seed appears to be stored as the variable "i", which is of type int. The seed method using two iterators does a ton of mangling over the range, and assigned i to the result.
I don't understand. I see this: template<class It> void seed(It& first, It last) { int j; for(j = 0; j < n && first != last; ++j, ++first) x[j] = *first; i = n; if(first == last && j < n) throw std::invalid_argument("mersenne_twister::seed"); } In Christ, Steven Watanabe