summaryrefslogtreecommitdiff
path: root/utils/sampler.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-02-25 21:22:27 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-02-25 21:22:27 -0500
commite279f1fd267bc18763fa8ff456462c5e677689e9 (patch)
tree866e94ea9cb78c672dee77f0d2161a7ddeb7e5da /utils/sampler.h
parentf05aab2a1041b844f411716f2557444bf480f06d (diff)
really slow hiero lm
Diffstat (limited to 'utils/sampler.h')
-rw-r--r--utils/sampler.h2
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");
}