- ENUM2(UpdateType,HUGIN,SHSH)
- UpdateType Updates() const { return GetPropertyAs<UpdateType>("updates"); }
-
- JTree() : DAIAlgRG(), _RTree(), _Qa(), _Qb(), _mes(), _logZ() {};
- JTree( const JTree& x ) : DAIAlgRG(x), _RTree(x._RTree), _Qa(x._Qa), _Qb(x._Qb), _mes(x._mes), _logZ(x._logZ) {};
- JTree* clone() const { return new JTree(*this); }
- JTree & operator=( const JTree& x ) {
- if( this != &x ) {
- DAIAlgRG::operator=(x);
- _RTree = x._RTree;
- _Qa = x._Qa;
- _Qb = x._Qb;
- _mes = x._mes;
- _logZ = x._logZ;
- }
- return *this;
- }
- JTree( const FactorGraph &fg, const Properties &opts, bool automatic=true );
+ /// Default constructor
+ JTree() : DAIAlgRG(), _mes(), _logZ(), RTree(), Qa(), Qb(), props() {}
+
+ /// Construct from FactorGraph fg and PropertySet opts
+ JTree( const FactorGraph &fg, const PropertySet &opts, bool automatic=true );
+
+
+ /// @name General InfAlg interface
+ //@{
+ virtual JTree* clone() const { return new JTree(*this); }
+ virtual JTree* create() const { return new JTree(); }
+ virtual std::string identify() const;
+ virtual Factor belief( const Var &n ) const;
+ virtual Factor belief( const VarSet &ns ) const;
+ virtual std::vector<Factor> beliefs() const;
+ virtual Real logZ() const;
+ virtual void init() {}
+ virtual void init( const VarSet &/*ns*/ ) {}
+ virtual double run();
+ virtual double maxDiff() const { return 0.0; }
+ virtual size_t Iterations() const { return 1UL; }
+ //@}
+
+
+ /// @name Additional interface specific for JTree
+ //@{