Closed mauzigoe closed 2 years ago
Hi @mauzigoe Thank you for reporting the bug. It has been confirmed that there is a bug in scalar generator of UniformInt class.
https://github.com/bab2min/EigenRand/blob/be563c3abc65864e8c8c70a444a374bbb9b70825/EigenRand/Dists/Discrete.h#L251-L280
Line 267 should return cands + pmin
, not cands
.
I'll fix this bug in the next update soon.
Thank you again for reporting.
Cool. Thank you for your work.
EigenRand Version:
0.4.0
When trying to create uniform random values between
-1
and1
withEigen::Rand::uniformIntLike
I get also values equal2
.I used the following code to create this bug:
In the output I one should see that there are values equal
2
though the range of the distribution is defined to be[-1,1]
.For the range
[0,1]
the function works as described in the documentation.