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