First working version of EM
[libdai.git] / include / dai / alldai.h
1 /* Copyright (C) 2006-2008 Joris Mooij [joris dot mooij at tuebingen dot mpg dot de]
2 Radboud University Nijmegen, The Netherlands /
3 Max Planck Institute for Biological Cybernetics, Germany
4
5 This file is part of libDAI.
6
7 libDAI is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 libDAI is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with libDAI; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22
23 /// \file
24 /// \brief Main libDAI header file
25 /// \todo Improve documentation
26
27
28 #ifndef __defined_libdai_alldai_h
29 #define __defined_libdai_alldai_h
30
31
32 #include <string>
33 #include <dai/daialg.h>
34 #include <dai/properties.h>
35 #include <dai/exactinf.h>
36 #include <dai/evidence.h>
37 #include <dai/emalg.h>
38 #ifdef DAI_WITH_BP
39 #include <dai/bp.h>
40 #endif
41 #ifdef DAI_WITH_MF
42 #include <dai/mf.h>
43 #endif
44 #ifdef DAI_WITH_HAK
45 #include <dai/hak.h>
46 #endif
47 #ifdef DAI_WITH_LC
48 #include <dai/lc.h>
49 #endif
50 #ifdef DAI_WITH_TREEEP
51 #include <dai/treeep.h>
52 #endif
53 #ifdef DAI_WITH_JTREE
54 #include <dai/jtree.h>
55 #endif
56 #ifdef DAI_WITH_MR
57 #include <dai/mr.h>
58 #endif
59 #ifdef DAI_WITH_GIBBS
60 #include <dai/gibbs.h>
61 #endif
62
63
64 /// Namespace for libDAI
65 namespace dai {
66
67
68 /// Constructs a new approximate inference algorithm.
69 /** \param name The name of the approximate inference algorithm (should be one of the names in DAINames).
70 * \param fg The FactorGraph that the algorithm should be applied to.
71 * \param opts A PropertySet specifying the options for the algorithm.
72 * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
73 */
74 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
75
76
77 /// Contains the names of all approximate inference algorithms compiled into libDAI.
78 static const char* DAINames[] = {
79 ExactInf::Name,
80 #ifdef DAI_WITH_BP
81 BP::Name,
82 #endif
83 #ifdef DAI_WITH_MF
84 MF::Name,
85 #endif
86 #ifdef DAI_WITH_HAK
87 HAK::Name,
88 #endif
89 #ifdef DAI_WITH_LC
90 LC::Name,
91 #endif
92 #ifdef DAI_WITH_TREEEP
93 TreeEP::Name,
94 #endif
95 #ifdef DAI_WITH_JTREE
96 JTree::Name,
97 #endif
98 #ifdef DAI_WITH_MR
99 MR::Name,
100 #endif
101 #ifdef DAI_WITH_GIBBS
102 Gibbs::Name,
103 #endif
104 ""
105 };
106
107
108 } // end of namespace dai
109
110
111 #endif