libDAI
|
00001 /* This file is part of libDAI - http://www.libdai.org/ 00002 * 00003 * Copyright (c) 2006-2011, The libDAI authors. All rights reserved. 00004 * 00005 * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 00006 */ 00007 00008 00018 #ifndef __defined_libdai_alldai_h 00019 #define __defined_libdai_alldai_h 00020 00021 00022 #include <string> 00023 #include <dai/daialg.h> 00024 #include <dai/properties.h> 00025 #include <dai/exactinf.h> 00026 #include <dai/evidence.h> 00027 #include <dai/emalg.h> 00028 #ifdef DAI_WITH_BP 00029 #include <dai/bp.h> 00030 #endif 00031 #ifdef DAI_WITH_FBP 00032 #include <dai/fbp.h> 00033 #endif 00034 #ifdef DAI_WITH_TRWBP 00035 #include <dai/trwbp.h> 00036 #endif 00037 #ifdef DAI_WITH_MF 00038 #include <dai/mf.h> 00039 #endif 00040 #ifdef DAI_WITH_HAK 00041 #include <dai/hak.h> 00042 #endif 00043 #ifdef DAI_WITH_LC 00044 #include <dai/lc.h> 00045 #endif 00046 #ifdef DAI_WITH_TREEEP 00047 #include <dai/treeep.h> 00048 #endif 00049 #ifdef DAI_WITH_JTREE 00050 #include <dai/jtree.h> 00051 #endif 00052 #ifdef DAI_WITH_MR 00053 #include <dai/mr.h> 00054 #endif 00055 #ifdef DAI_WITH_GIBBS 00056 #include <dai/gibbs.h> 00057 #endif 00058 #ifdef DAI_WITH_CBP 00059 #include <dai/cbp.h> 00060 #endif 00061 #ifdef DAI_WITH_DECMAP 00062 #include <dai/decmap.h> 00063 #endif 00064 00065 00067 namespace dai { 00068 00069 00071 std::map<std::string, InfAlg *>& builtinInfAlgs(); 00072 00073 00075 /* These are the names of the algorithms that were compiled in and can be 00076 * given to \ref newInfAlg and \ref newInfAlgFromString. 00077 * \return A set of strings, each one corresponding with the name of an available inference algorithm. 00078 * \note The set is returned by value because it will be reasonably small 00079 * enough and this function is expected to be called infrequently. 00080 */ 00081 std::set<std::string> builtinInfAlgNames(); 00082 00083 00085 00091 InfAlg *newInfAlg( const std::string &name, const FactorGraph &fg, const PropertySet &opts ); 00092 00093 00095 00100 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg ); 00101 00102 00104 00110 InfAlg *newInfAlgFromString( const std::string &nameOpts, const FactorGraph &fg, const std::map<std::string,std::string> &aliases ); 00111 00112 00114 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s ); 00115 00116 00118 00122 std::pair<std::string, PropertySet> parseNameProperties( const std::string &s, const std::map<std::string,std::string> &aliases ); 00123 00124 00126 00130 std::map<std::string,std::string> readAliasesFile( const std::string &filename ); 00131 00132 00133 } // end of namespace dai 00134 00135 00161 #endif