Registered Member
|
VectorXi::Random() seems always return random integers from [-10,10]. Is this by design? and Why?
|
Registered Member
|
Forgot to mention that I'm using Eigen 3 beta1, the code is simply cout<< VectorXi::Random(20); |
Registered Member
|
It's true. The reason was that I wanted to get nice-looking examples in the documentation, which I admit is a pretty bad reason. I guess we should switch the default uniform distribution over the integer type's range, and keep a compile-time option for the old behavior for making the docs.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
That will be great. Thanks. Btw, I think random number generators really should be optimized both on the efficiency and random cycle lengths, since they are crucial for some applications like statistics and Monte Carlo simulation. |
Registered Member
|
Our random generator is not optimized at all, and we don't have a big interest in that, it's not our specialty; if this is performance critical to you, you should use your own.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], blue_bullet, Google [Bot], Sogou [Bot]