BayesBall: improve encapsulation
This commit is contained in:
parent
9a68d95c18
commit
1d54a78601
|
@ -12,19 +12,6 @@
|
||||||
|
|
||||||
namespace Horus {
|
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 {
|
class BayesBall {
|
||||||
public:
|
public:
|
||||||
BayesBall (FactorGraph& fg);
|
BayesBall (FactorGraph& fg);
|
||||||
|
@ -34,6 +21,17 @@ class BayesBall {
|
||||||
static FactorGraph* getMinimalFactorGraph (FactorGraph& fg, VarIds vids);
|
static FactorGraph* getMinimalFactorGraph (FactorGraph& fg, VarIds vids);
|
||||||
|
|
||||||
private:
|
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 constructGraph (FactorGraph* fg) const;
|
||||||
|
|
||||||
void scheduleParents (const BBNode* n, Scheduling& sch) const;
|
void scheduleParents (const BBNode* n, Scheduling& sch) const;
|
||||||
|
|
Reference in New Issue