diff --git a/packages/CLPBN/horus/Factor.cpp b/packages/CLPBN/horus/Factor.cpp index 1bd582dd3..ed258c2c6 100644 --- a/packages/CLPBN/horus/Factor.cpp +++ b/packages/CLPBN/horus/Factor.cpp @@ -5,6 +5,7 @@ #include #include "Factor.h" +#include "Indexer.h" #include "Var.h" diff --git a/packages/CLPBN/horus/Factor.h b/packages/CLPBN/horus/Factor.h index 38ebd407f..7f95e3292 100644 --- a/packages/CLPBN/horus/Factor.h +++ b/packages/CLPBN/horus/Factor.h @@ -7,7 +7,6 @@ #include #include "GenericFactor.h" -#include "Indexer.h" #include "Util.h" diff --git a/packages/CLPBN/horus/GroundSolver.cpp b/packages/CLPBN/horus/GroundSolver.cpp index 593eddbda..c4ea6f50e 100644 --- a/packages/CLPBN/horus/GroundSolver.cpp +++ b/packages/CLPBN/horus/GroundSolver.cpp @@ -9,6 +9,7 @@ #include "VarElim.h" #include "BeliefProp.h" #include "CountingBp.h" +#include "Indexer.h" #include "Util.h" diff --git a/packages/CLPBN/horus/LiftedBp.h b/packages/CLPBN/horus/LiftedBp.h index bb0c4e36d..c906d5868 100644 --- a/packages/CLPBN/horus/LiftedBp.h +++ b/packages/CLPBN/horus/LiftedBp.h @@ -5,6 +5,7 @@ #include "LiftedSolver.h" #include "ParfactorList.h" +#include "Indexer.h" namespace Horus { diff --git a/packages/CLPBN/horus/Parfactor.h b/packages/CLPBN/horus/Parfactor.h index 8066ed0dc..a9ab5f151 100644 --- a/packages/CLPBN/horus/Parfactor.h +++ b/packages/CLPBN/horus/Parfactor.h @@ -4,7 +4,7 @@ #include #include -#include "Factor.h" +#include "GenericFactor.h" #include "ProbFormula.h" #include "ConstraintTree.h" #include "LiftedUtils.h" diff --git a/packages/CLPBN/horus/ProbFormula.cpp b/packages/CLPBN/horus/ProbFormula.cpp index 1fcb2726d..411da4e73 100644 --- a/packages/CLPBN/horus/ProbFormula.cpp +++ b/packages/CLPBN/horus/ProbFormula.cpp @@ -100,15 +100,6 @@ ProbFormula::rename (LogVar oldName, LogVar newName) -bool -operator== (const ProbFormula& f1, const ProbFormula& f2) -{ - return f1.group_ == f2.group_ && - f1.logVars_ == f2.logVars_; -} - - - std::ostream& operator<< (std::ostream& os, const ProbFormula& f) { diff --git a/packages/CLPBN/horus/ProbFormula.h b/packages/CLPBN/horus/ProbFormula.h index d477caeed..4e51c1571 100644 --- a/packages/CLPBN/horus/ProbFormula.h +++ b/packages/CLPBN/horus/ProbFormula.h @@ -63,6 +63,7 @@ class ProbFormula { static PrvGroup getNewGroup(); private: + friend bool operator== ( const ProbFormula& f1, const ProbFormula& f2); @@ -80,6 +81,14 @@ class ProbFormula { typedef std::vector ProbFormulas; +inline bool +operator== (const ProbFormula& f1, const ProbFormula& f2) +{ + return f1.group_ == f2.group_ && f1.logVars_ == f2.logVars_; +} + + + class ObservedFormula { public: ObservedFormula (Symbol f, unsigned a, unsigned ev);