git HEAD
--------
+* [Julien Rebetez] added FactorGraph::printDot() to SWIG interface
+* Build system: optional compilation targets are now set in include/dai/dai_config.h instead of Makefile.ALL
+* Workaround for bug in Boost Graph Library version 1.54 ("The graph may not contain an edge with negative weight") by not using Prim's minimum spanning tree algorithm anymore
+* Removed conversion script FastInf->libDAI because it is buggy (uses wrong permutation of factor entries)
* Extended SWIG python interface (inspired by Kyle Ellrott): inference is possible in Python now!
* Added toString() formatting functions to the classes that had an output streaming operator<<
* Replaced all occurrences of std::size_t by size_t to avoid SWIG problems
#define __defined_libdai_config_h
-//#define DAI_WITH_BP
-//#define DAI_WITH_FBP
-//#define DAI_WITH_TRWBP
-//#define DAI_WITH_MF
-//#define DAI_WITH_HAK
-//#define DAI_WITH_LC
-//#define DAI_WITH_TREEEP
-//#define DAI_WITH_JTREE
-//#define DAI_WITH_MR
-//#define DAI_WITH_GIBBS
-//#define DAI_WITH_CBP
-//#define DAI_WITH_DECMAP
-//#define DAI_WITH_GLC
+#define DAI_WITH_BP
+#define DAI_WITH_FBP
+#define DAI_WITH_TRWBP
+#define DAI_WITH_MF
+#define DAI_WITH_HAK
+#define DAI_WITH_LC
+#define DAI_WITH_TREEEP
+#define DAI_WITH_JTREE
+#define DAI_WITH_MR
+#define DAI_WITH_GIBBS
+#define DAI_WITH_CBP
+#define DAI_WITH_DECMAP
+#define DAI_WITH_GLC
#endif
%module dai
+#include <fstream>
+
%include "std_string.i"
%include "std_vector.i"
%template(IntVector) std::vector<size_t>;
%extend dai::FactorGraph {
inline const char* __str__() const { return (*self).toString().c_str(); } /* for python */
inline std::string __str() const { return (*self).toString(); } /* for octave */
+ inline void printDot(const std::string& fname) const {
+ std::ofstream o(fname.c_str(), std::ofstream::out);
+ self->printDot(o);
+ o.close();
+ }
}
// ************************************************************************************************