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