George Russell wrote:
Matt Harden wrote:
I don't think that's really true. If I understand it correctly, the
state can be any type; it doesn't have to fit in, say, an Int or other
small type. I think the Mersenne Twister could be implemented as an
instance of Random.RandomGen. The
Matt Harden wrote:
I don't think that's really true. If I understand it correctly, the
state can be any type; it doesn't have to fit in, say, an Int or other
small type. I think the Mersenne Twister could be implemented as an
instance of Random.RandomGen. The only thing is I don't really
Sergey
The essence of your message is that the H98 Random library
defn of randomR doesn't really make sense if the type does
not belong to Ord.
I don't want to specify that
| It is required randomR (lo,hi) g == randomR (hi,lo) g
as you suggest. That would be counter-intuitive for
Personally I have only one gripe with the Random class in Standard Haskell;
this is that it provides too much functionality.
In general I think you can only have two of the following 3:
(1) good random numbers
(2) speed
(3) small state
For example the Mersenne Twister is very very good and
George Russell wrote:
Personally I have only one gripe with the Random class in Standard Haskell;
this is that it provides too much functionality.
In general I think you can only have two of the following 3:
(1) good random numbers
(2) speed
(3) small state
For example the Mersenne