hsloot / rmo

An R package for Marshall--Olkin distributions and copulas.
https://hsloot.github.io/rmo/
GNU General Public License v3.0
5 stars 2 forks source link

[BUG] `uniform_int_distribution` does not implement the C++ standard #96

Open hsloot opened 3 years ago

hsloot commented 3 years ago

Description

The current implementation of rmolib::random::uniform_int_distribution does not implement the standard in https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution as it samples from [lower, upper) instead of [lower, upper].

The distribution seems to be used such that the final algorithms are correct (i.e. if the C++ uniform_int_distribution would be used, they would not be correct anymore).