
26 Aug
2005
26 Aug
'05
9:58 p.m.
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?