diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-25 21:22:27 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-25 21:22:27 -0500 |
commit | e279f1fd267bc18763fa8ff456462c5e677689e9 (patch) | |
tree | 866e94ea9cb78c672dee77f0d2161a7ddeb7e5da /utils/sampler.h | |
parent | f05aab2a1041b844f411716f2557444bf480f06d (diff) |
really slow hiero lm
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 153e7ef1..22c873d4 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"); } |