libDAI
alldai.h
Go to the documentation of this file.
1 /* This file is part of libDAI - http://www.libdai.org/
2  *
3  * Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
4  *
5  * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
6  */
7 
8 
18 #ifndef __defined_libdai_alldai_h
19 #define __defined_libdai_alldai_h
20 
21 
22 #include <string>
23 #include <dai/daialg.h>
24 #include <dai/properties.h>
25 #include <dai/exactinf.h>
26 #include <dai/evidence.h>
27 #include <dai/emalg.h>
28 #ifdef DAI_WITH_BP
29  #include <dai/bp.h>
30 #endif
31 #ifdef DAI_WITH_FBP
32  #include <dai/fbp.h>
33 #endif
34 #ifdef DAI_WITH_TRWBP
35  #include <dai/trwbp.h>
36 #endif
37 #ifdef DAI_WITH_MF
38  #include <dai/mf.h>
39 #endif
40 #ifdef DAI_WITH_HAK
41  #include <dai/hak.h>
42 #endif
43 #ifdef DAI_WITH_LC
44  #include <dai/lc.h>
45 #endif
46 #ifdef DAI_WITH_TREEEP
47  #include <dai/treeep.h>
48 #endif
49 #ifdef DAI_WITH_JTREE
50  #include <dai/jtree.h>
51 #endif
52 #ifdef DAI_WITH_MR
53  #include <dai/mr.h>
54 #endif
55 #ifdef DAI_WITH_GIBBS
56  #include <dai/gibbs.h>
57 #endif
58 #ifdef DAI_WITH_CBP
59  #include <dai/cbp.h>
60 #endif
61 #ifdef DAI_WITH_DECMAP
62  #include <dai/decmap.h>
63 #endif
64 
65 
67 namespace dai {
68 
69 
71 
73 std::map<std::string, InfAlg *>& builtinInfAlgs();
74 
75 
77 /* These are the names of the algorithms that were compiled in and can be
78  * given to \ref newInfAlg and \ref newInfAlgFromString.
79  * \return A set of strings, each one corresponding with the name of an available inference algorithm.
80  * \note The set is returned by value because it will be reasonably small
81  * enough and this function is expected to be called infrequently.
82  */
83 std::set<std::string> builtinInfAlgNames();
84 
85 
87 
93 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
94 
95 
97 
102 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
103 
104 
106 
112 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg, const std::map<std::string,std::string> &aliases );
113 
114 
116 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s );
117 
118 
120 
124 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s, const std::map<std::string,std::string> &aliases );
125 
126 
128 
132 std::map<std::string,std::string> readAliasesFile( const std::string &filename );
133 
134 
135 } // end of namespace dai
136 
137 
163 #endif