e39125f365cbfd547fd87f6b493db91b9a0a37f9
[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 #ifdef DAI_WITH_BP
37 #include <dai/bp.h>
38 #endif
39 #ifdef DAI_WITH_MF
40 #include <dai/mf.h>
41 #endif
42 #ifdef DAI_WITH_HAK
43 #include <dai/hak.h>
44 #endif
45 #ifdef DAI_WITH_LC
46 #include <dai/lc.h>
47 #endif
48 #ifdef DAI_WITH_TREEEP
49 #include <dai/treeep.h>
50 #endif
51 #ifdef DAI_WITH_JTREE
52 #include <dai/jtree.h>
53 #endif
54 #ifdef DAI_WITH_MR
55 #include <dai/mr.h>
56 #endif
57 #ifdef DAI_WITH_GIBBS
58 #include <dai/gibbs.h>
59 #endif
60 #ifdef DAI_WITH_BP_DUAL
61 #include <dai/bp_dual.h>
62 #endif
63 #ifdef DAI_WITH_CBP
64 #include <dai/cbp.h>
65 #endif
66
67
68 /// Namespace for libDAI
69 namespace dai {
70
71
72 /// Constructs a new approximate inference algorithm.
73 /** \param name The name of the approximate inference algorithm (should be one of the names in DAINames).
74 * \param fg The FactorGraph that the algorithm should be applied to.
75 * \param opts A PropertySet specifying the options for the algorithm.
76 * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
77 */
78 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
79
80
81 /// Constructs a new approximate inference algorithm.
82 /** \param nameOpts The name and options of the approximate inference algorithm (should be in the format "name[opts]").
83 * \param fg The FactorGraph that the algorithm should be applied to.
84 * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
85 */
86 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
87
88
89 /// Contains the names of all approximate inference algorithms compiled into libDAI.
90 static const char* DAINames[] = {
91 ExactInf::Name,
92 #ifdef DAI_WITH_BP
93 BP::Name,
94 #endif
95 #ifdef DAI_WITH_MF
96 MF::Name,
97 #endif
98 #ifdef DAI_WITH_HAK
99 HAK::Name,
100 #endif
101 #ifdef DAI_WITH_LC
102 LC::Name,
103 #endif
104 #ifdef DAI_WITH_TREEEP
105 TreeEP::Name,
106 #endif
107 #ifdef DAI_WITH_JTREE
108 JTree::Name,
109 #endif
110 #ifdef DAI_WITH_MR
111 MR::Name,
112 #endif
113 #ifdef DAI_WITH_GIBBS
114 Gibbs::Name,
115 #endif
116 #ifdef DAI_WITH_CBP
117 CBP::Name,
118 #endif
119 ""
120 };
121
122
123 } // end of namespace dai
124
125
126 #endif