summaryrefslogtreecommitdiff
path: root/gi/pyp-topics
diff options
context:
space:
mode:
authorphilblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-15 04:05:13 +0000
committerphilblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-15 04:05:13 +0000
commit289873e898104ed56d88f819cc5559b69d3f1f2d (patch)
tree89996929a466e3b3b1e0aa6010a3d4f580da0302 /gi/pyp-topics
parentc41fc46e66a231b2e06b2b7d927c40325d4923c5 (diff)
Fixed bug with random number generator passed to slice sampler.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@261 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics')
-rw-r--r--gi/pyp-topics/src/pyp.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/gi/pyp-topics/src/pyp.hh b/gi/pyp-topics/src/pyp.hh
index dc47244b..a508e517 100644
--- a/gi/pyp-topics/src/pyp.hh
+++ b/gi/pyp-topics/src/pyp.hh
@@ -530,7 +530,7 @@ PYP<Dish,Hash>::resample_prior_b() {
//std::cerr << "\n## resample_prior_b(), initial a = " << _a << ", b = " << _b << std::endl;
resample_b_type b_log_prob(_total_customers, _total_tables, _a, _b_gamma_c, _b_gamma_s);
//_b = slice_sampler1d(b_log_prob, _b, rnd, (double) 0.0, std::numeric_limits<double>::infinity(),
- _b = slice_sampler1d(b_log_prob, _b, random, (double) 0.0, std::numeric_limits<double>::infinity(),
+ _b = slice_sampler1d(b_log_prob, _b, mt_genrand_res53, (double) 0.0, std::numeric_limits<double>::infinity(),
(double) 0.0, niterations, 100*niterations);
//std::cerr << "\n## resample_prior_b(), final a = " << _a << ", b = " << _b << std::endl;
}
@@ -545,7 +545,7 @@ PYP<Dish,Hash>::resample_prior_a() {
//std::cerr << "\n## Initial a = " << _a << ", b = " << _b << std::endl;
resample_a_type a_log_prob(_total_customers, _total_tables, _b, _a_beta_a, _a_beta_b, _dish_tables);
//_a = slice_sampler1d(a_log_prob, _a, rnd, std::numeric_limits<double>::min(),
- _a = slice_sampler1d(a_log_prob, _a, random, std::numeric_limits<double>::min(),
+ _a = slice_sampler1d(a_log_prob, _a, mt_genrand_res53, std::numeric_limits<double>::min(),
(double) 1.0, (double) 0.0, niterations, 100*niterations);
}