diff options
Diffstat (limited to 'utils/sampler.h')
-rw-r--r-- | utils/sampler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/sampler.h b/utils/sampler.h index cae660d2..bdbc01b0 100644 --- a/utils/sampler.h +++ b/utils/sampler.h @@ -48,7 +48,7 @@ struct RandomNumberGenerator { template <typename F> size_t SelectSample(const F& a, const F& b, double T = 1.0) { if (T == 1.0) { - if (this->next() > (a / (a + b))) return 1; else return 0; + if (F(this->next()) > (a / (a + b))) return 1; else return 0; } else { assert(!"not implemented"); } |