Removed all the virtual default constructors *::create(), as they are not used.
[libdai.git] / include / dai / gibbs.h
index afdaa06..d63d0d4 100644 (file)
@@ -74,7 +74,6 @@ class Gibbs : public DAIAlgFG {
         /// @name General InfAlg interface
         //@{
         virtual Gibbs* clone() const { return new Gibbs(*this); }
-        virtual Gibbs* create() const { return new Gibbs(); }
         virtual std::string identify() const { return std::string(Name) + printProperties(); }
         virtual Factor belief( const Var &n ) const;
         virtual Factor belief( const VarSet &ns ) const;
@@ -88,13 +87,19 @@ class Gibbs : public DAIAlgFG {
         //@}
 
 
-        /// @name Additional interface specific for BP
+        /// @name Additional interface specific for Gibbs
         //@{
         Factor beliefV( size_t i ) const;
         Factor beliefF( size_t I ) const;
         void randomizeState();
         //@}
 
+        /// Return reference to current state vector
+        std::vector<size_t>& state() { return _state; }
+
+        /// Return const reference to current state vector
+        const std::vector<size_t>& state() const { return _state; }
+
     private:
         void updateCounts();
         Prob getVarDist( size_t i );