|
Boost : |
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2005-08-26 16:58:51
Robert Ramey wrote:
[...]
>
> But I'm intrigued about one thing. It seems to me that if you have an
> instance of the class meserenne twister and serialize it to a file then
> load it back to another instance - the two wont be equal unless compute(j)
> == j ?
>
> What am I missing here?
friend bool operator==(const mersenne_twister& x, const mersenne_twister& y)
{
for(int j = 0; j < state_size; ++j)
if(x.compute(j) != y.compute(j))
return false;
return true;
}
I don't understand why you say that. It compares == if the states are ==
over the stat_size. Isn't that correct?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk