From d5d7820830c2a2beda775a674f39fc8506f8a8f6 Mon Sep 17 00:00:00 2001 From: "philblunsom@gmail.com" Date: Fri, 16 Jul 2010 04:50:35 +0000 Subject: working on mpi implementation. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@283 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pyp-topics/src/pyp.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gi/pyp-topics/src/pyp.hh') diff --git a/gi/pyp-topics/src/pyp.hh b/gi/pyp-topics/src/pyp.hh index 26f6ab2e..84decb0f 100644 --- a/gi/pyp-topics/src/pyp.hh +++ b/gi/pyp-topics/src/pyp.hh @@ -1,6 +1,7 @@ #ifndef _pyp_hh #define _pyp_hh +#include "slice-sampler.h" #include #include #include @@ -11,7 +12,6 @@ #include #include "log_add.h" -#include "slice-sampler.h" #include "mt19937ar.h" // @@ -63,7 +63,7 @@ public: double b() const { return _b; } void set_b(double b) { _b = b; } - void clear(); + virtual void clear(); std::ostream& debug_info(std::ostream& os) const; double log_restaurant_prob() const; @@ -75,13 +75,12 @@ public: void resample_prior_a(); void resample_prior_b(); -private: +protected: double _a, _b; // parameters of the Pitman-Yor distribution double _a_beta_a, _a_beta_b; // parameters of Beta prior on a double _b_gamma_s, _b_gamma_c; // parameters of Gamma prior on b - struct TableCounter - { + struct TableCounter { TableCounter() : tables(0) {}; int tables; std::map table_histogram; // num customers at table -> number tables -- cgit v1.2.3