summaryrefslogtreecommitdiff
path: root/gi
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
commit20ab64d519569d09f9e286425cdcd7ecac236bf2 (patch)
tree6ec5ed28a6a48a084d4f5cc45afd518bb91834ee /gi
parent5ced7dafa49c51e9353413b82ecd6402d4a93dd6 (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')
-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);
}