Extended SWIG python interface (inspired by Kyle Ellrott): inference is possible...
[libdai.git] / include / dai / prob.h
index d1b6895..51dfe47 100644 (file)
@@ -420,6 +420,13 @@ class TProb {
                 return false;
             return p() == q.p();
         }
+
+        /// Formats a TProb as a string
+        std::string toString() const {
+            std::stringstream ss;
+            ss << *this;
+            return ss.str();
+        }
     //@}
 
     /// \name Unary transformations