BayesBall: improve encapsulation

This commit is contained in:
Tiago Gomes 2013-02-20 14:13:37 +00:00
parent 9a68d95c18
commit 1d54a78601
1 changed files with 11 additions and 13 deletions

View File

@ -12,19 +12,6 @@
namespace Horus {
struct ScheduleInfo {
ScheduleInfo (BBNode* n, bool vfp, bool vfc)
: node(n), visitedFromParent(vfp), visitedFromChild(vfc) { }
BBNode* node;
bool visitedFromParent;
bool visitedFromChild;
};
typedef std::queue<ScheduleInfo, std::list<ScheduleInfo>> Scheduling;
class BayesBall {
public:
BayesBall (FactorGraph& fg);
@ -34,6 +21,17 @@ class BayesBall {
static FactorGraph* getMinimalFactorGraph (FactorGraph& fg, VarIds vids);
private:
struct ScheduleInfo {
ScheduleInfo (BBNode* n, bool vfp, bool vfc)
: node(n), visitedFromParent(vfp), visitedFromChild(vfc) { }
BBNode* node;
bool visitedFromParent;
bool visitedFromChild;
};
typedef std::queue<ScheduleInfo, std::list<ScheduleInfo>> Scheduling;
void constructGraph (FactorGraph* fg) const;
void scheduleParents (const BBNode* n, Scheduling& sch) const;