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
commit9007216a43c5572c2c343a1700ac79fb35b7d82f (patch)
tree10d9ccd68e9bb1ace905fe0ca5eff6f2ef87b5a7 /utils/sampler.h
parent2faca3e7b3b8e4eba6c036c635a5b23883e72337 (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");
}