-/* Copyright (C) 2006-2008 Joris Mooij [j dot mooij at science dot ru dot nl]
- Radboud University Nijmegen, The Netherlands
-
+/* Copyright (C) 2006-2008 Joris Mooij [joris dot mooij at tuebingen dot mpg dot de]
+ Radboud University Nijmegen, The Netherlands /
+ Max Planck Institute for Biological Cybernetics, Germany
+
This file is part of libDAI.
libDAI is free software; you can redistribute it and/or modify
*/
+/// \file
+/// \brief Main libDAI header file
+/// \todo Improve documentation
+
+
#ifndef __defined_libdai_alldai_h
#define __defined_libdai_alldai_h
#include <dai/daialg.h>
#include <dai/properties.h>
#include <dai/exactinf.h>
-#ifdef WITH_BP
+#include <dai/evidence.h>
+#include <dai/emalg.h>
+#ifdef DAI_WITH_BP
#include <dai/bp.h>
#endif
-#ifdef WITH_MF
+#ifdef DAI_WITH_MF
#include <dai/mf.h>
#endif
-#ifdef WITH_HAK
+#ifdef DAI_WITH_HAK
#include <dai/hak.h>
#endif
-#ifdef WITH_LC
+#ifdef DAI_WITH_LC
#include <dai/lc.h>
#endif
-#ifdef WITH_TREEEP
+#ifdef DAI_WITH_TREEEP
#include <dai/treeep.h>
#endif
-#ifdef WITH_JTREE
+#ifdef DAI_WITH_JTREE
#include <dai/jtree.h>
#endif
-#ifdef WITH_MR
+#ifdef DAI_WITH_MR
#include <dai/mr.h>
#endif
+#ifdef DAI_WITH_GIBBS
+ #include <dai/gibbs.h>
+#endif
+#ifdef DAI_WITH_CBP
+ #include <dai/cbp.h>
+#endif
+/// Namespace for libDAI
namespace dai {
-/// newInfAlg constructs a new approximate inference algorithm named name for the
-/// FactorGraph fg with optionts opts and returns a pointer to the new object.
-/// The caller needs to delete it (maybe some sort of smart_ptr might be useful here).
+/// Constructs a new approximate inference algorithm.
+/** \param name The name of the approximate inference algorithm (should be one of the names in DAINames).
+ * \param fg The FactorGraph that the algorithm should be applied to.
+ * \param opts A PropertySet specifying the options for the algorithm.
+ * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
+ */
InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
-/// DAINames contains the names of all approximate inference algorithms
+/// Constructs a new approximate inference algorithm.
+/** \param nameOpts The name and options of the approximate inference algorithm (should be in the format "name[opts]").
+ * \param fg The FactorGraph that the algorithm should be applied to.
+ * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
+ */
+InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
+
+/// Contains the names of all approximate inference algorithms compiled into libDAI.
static const char* DAINames[] = {
ExactInf::Name,
-#ifdef WITH_BP
+#ifdef DAI_WITH_BP
BP::Name,
#endif
-#ifdef WITH_MF
+#ifdef DAI_WITH_MF
MF::Name,
#endif
-#ifdef WITH_HAK
+#ifdef DAI_WITH_HAK
HAK::Name,
#endif
-#ifdef WITH_LC
+#ifdef DAI_WITH_LC
LC::Name,
#endif
-#ifdef WITH_TREEEP
+#ifdef DAI_WITH_TREEEP
TreeEP::Name,
#endif
-#ifdef WITH_JTREE
+#ifdef DAI_WITH_JTREE
JTree::Name,
#endif
-#ifdef WITH_MR
+#ifdef DAI_WITH_MR
MR::Name,
+#endif
+#ifdef DAI_WITH_GIBBS
+ Gibbs::Name,
+#endif
+#ifdef DAI_WITH_CBP
+ CBP::Name,
#endif
""
};