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
Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: 22 December 1999 20:17
| To: [EMAIL PROTECTED]
| Subject: suggestion for Random.randomR
|
|
| Suggestion for Haskell-2 library module Random.
|
|
|
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
Suggestion for Haskell-2 library module Random.
Haskell-98 declares
class Random a where randomR :: RandomGen g = (a, a) - g - (a, g)
...
...
instance Random Int where ...
instance Random Integer