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
00065
00067 namespace dai {
00068
00069
00071
00077 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts );
00078
00079
00081
00086 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg );
00087
00088
00090
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
00180 #endif