00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00021 #ifndef __defined_libdai_alldai_h
00022 #define __defined_libdai_alldai_h
00023
00024
00025 #include <string>
00026 #include <dai/daialg.h>
00027 #include <dai/properties.h>
00028 #include <dai/exactinf.h>
00029 #include <dai/evidence.h>
00030 #include <dai/emalg.h>
00031 #ifdef DAI_WITH_BP
00032 #include <dai/bp.h>
00033 #endif
00034 #ifdef DAI_WITH_FBP
00035 #include <dai/fbp.h>
00036 #endif
00037 #ifdef DAI_WITH_TRWBP
00038 #include <dai/trwbp.h>
00039 #endif
00040 #ifdef DAI_WITH_MF
00041 #include <dai/mf.h>
00042 #endif
00043 #ifdef DAI_WITH_HAK
00044 #include <dai/hak.h>
00045 #endif
00046 #ifdef DAI_WITH_LC
00047 #include <dai/lc.h>
00048 #endif
00049 #ifdef DAI_WITH_TREEEP
00050 #include <dai/treeep.h>
00051 #endif
00052 #ifdef DAI_WITH_JTREE
00053 #include <dai/jtree.h>
00054 #endif
00055 #ifdef DAI_WITH_MR
00056 #include <dai/mr.h>
00057 #endif
00058 #ifdef DAI_WITH_GIBBS
00059 #include <dai/gibbs.h>
00060 #endif
00061 #ifdef DAI_WITH_CBP
00062 #include <dai/cbp.h>
00063 #endif
00064 #ifdef DAI_WITH_DECMAP
00065 #include <dai/decmap.h>
00066 #endif
00067
00068
00070 namespace dai {
00071
00072
00074
00080 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
00081
00082
00084
00089 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
00090
00091
00093
00099 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg, const std::map<std::string,std::string> &aliases );
00100
00101
00103 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s );
00104
00105
00107
00111 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s, const std::map<std::string,std::string> &aliases );
00112
00113
00115
00119 std::map<std::string,std::string> readAliasesFile( const std::string &filename );
00120
00121
00123 static const char* DAINames[] = {
00124 ExactInf::Name,
00125 #ifdef DAI_WITH_BP
00126 BP::Name,
00127 #endif
00128 #ifdef DAI_WITH_FBP
00129 FBP::Name,
00130 #endif
00131 #ifdef DAI_WITH_TRWBP
00132 TRWBP::Name,
00133 #endif
00134 #ifdef DAI_WITH_MF
00135 MF::Name,
00136 #endif
00137 #ifdef DAI_WITH_HAK
00138 HAK::Name,
00139 #endif
00140 #ifdef DAI_WITH_LC
00141 LC::Name,
00142 #endif
00143 #ifdef DAI_WITH_TREEEP
00144 TreeEP::Name,
00145 #endif
00146 #ifdef DAI_WITH_JTREE
00147 JTree::Name,
00148 #endif
00149 #ifdef DAI_WITH_MR
00150 MR::Name,
00151 #endif
00152 #ifdef DAI_WITH_GIBBS
00153 Gibbs::Name,
00154 #endif
00155 #ifdef DAI_WITH_CBP
00156 CBP::Name,
00157 #endif
00158 #ifdef DAI_WITH_DECMAP
00159 DecMAP::Name,
00160 #endif
00161 ""
00162 };
00163
00164
00165 }
00166
00167
00193 #endif