From 20ab64d519569d09f9e286425cdcd7ecac236bf2 Mon Sep 17 00:00:00 2001 From: "philblunsom@gmail.com" Date: Thu, 15 Jul 2010 04:05:13 +0000 Subject: 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 --- gi/pyp-topics/src/pyp.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gi/pyp-topics') 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::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::infinity(), - _b = slice_sampler1d(b_log_prob, _b, random, (double) 0.0, std::numeric_limits::infinity(), + _b = slice_sampler1d(b_log_prob, _b, mt_genrand_res53, (double) 0.0, std::numeric_limits::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::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::min(), - _a = slice_sampler1d(a_log_prob, _a, random, std::numeric_limits::min(), + _a = slice_sampler1d(a_log_prob, _a, mt_genrand_res53, std::numeric_limits::min(), (double) 1.0, (double) 0.0, niterations, 100*niterations); } -- cgit v1.2.3