Updated copyright headers
[libdai.git] / include / dai / alldai.h
1 /* This file is part of libDAI - http://www.libdai.org/
2 *
3 * libDAI is licensed under the terms of the GNU General Public License version
4 * 2, or (at your option) any later version. libDAI is distributed without any
5 * warranty. See the file COPYING for more details.
6 *
7 * Copyright (C) 2006-2009 Joris Mooij [joris dot mooij at libdai dot org]
8 * Copyright (C) 2006-2007 Radboud University Nijmegen, The Netherlands
9 */
10
11
12 /// \file
13 /// \brief Main libDAI header file
14 /// \todo Improve documentation
15
16
17 #ifndef __defined_libdai_alldai_h
18 #define __defined_libdai_alldai_h
19
20
21 #include <string>
22 #include <dai/daialg.h>
23 #include <dai/properties.h>
24 #include <dai/exactinf.h>
25 #include <dai/evidence.h>
26 #include <dai/emalg.h>
27 #ifdef DAI_WITH_BP
28 #include <dai/bp.h>
29 #endif
30 #ifdef DAI_WITH_MF
31 #include <dai/mf.h>
32 #endif
33 #ifdef DAI_WITH_HAK
34 #include <dai/hak.h>
35 #endif
36 #ifdef DAI_WITH_LC
37 #include <dai/lc.h>
38 #endif
39 #ifdef DAI_WITH_TREEEP
40 #include <dai/treeep.h>
41 #endif
42 #ifdef DAI_WITH_JTREE
43 #include <dai/jtree.h>
44 #endif
45 #ifdef DAI_WITH_MR
46 #include <dai/mr.h>
47 #endif
48 #ifdef DAI_WITH_GIBBS
49 #include <dai/gibbs.h>
50 #endif
51 #ifdef DAI_WITH_CBP
52 #include <dai/cbp.h>
53 #endif
54
55
56 /// Namespace for libDAI
57 namespace dai {
58
59
60 /// Constructs a new approximate inference algorithm.
61 /** \param name The name of the approximate inference algorithm (should be one of the names in DAINames).
62 * \param fg The FactorGraph that the algorithm should be applied to.
63 * \param opts A PropertySet specifying the options for the algorithm.
64 * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
65 */
66 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
67
68
69 /// Constructs a new approximate inference algorithm.
70 /** \param nameOpts The name and options of the approximate inference algorithm (should be in the format "name[opts]").
71 * \param fg The FactorGraph that the algorithm should be applied to.
72 * \return Returns a pointer to the new InfAlg object; it is the responsibility of the caller to delete it later.
73 */
74 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
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 #ifdef DAI_WITH_CBP
105 CBP::Name,
106 #endif
107 ""
108 };
109
110
111 } // end of namespace dai
112
113
114 #endif