diff --git a/src/Random.cpp b/src/Random.cpp index fad22963..1e4896f7 100644 --- a/src/Random.cpp +++ b/src/Random.cpp @@ -60,8 +60,8 @@ void Random::prop_sample_bucket( // all probabilities are the same if (heavy == n) { - for (auto i = 0; i < size; ++i) { - *result = (*rng)(n); + for (size_t i = 0; i < size; ++i) { + *result = (*rng)((uint64_t)n); ++result; } return; @@ -121,9 +121,9 @@ void Random::prop_sample_bucket( } // sample - for (auto i = 0; i < size; ++i) { - size_t bucket = (*rng)(n); - double acceptance = dqrng::uniform01((*rng)()); + for (size_t i = 0; i < size; ++i) { + size_t bucket = (*rng)((uint64_t)n); + double acceptance = rng->uniform01(); *result = (acceptance < dividing_probs[bucket]) ? bucket : alternative_index[bucket]; ++result;