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 00011 00012 00013 #ifndef __defined_libdai_createfg_h 00014 #define __defined_libdai_createfg_h 00015 00016 00017 #include <dai/factor.h> 00018 #include <vector> 00019 #include <map> 00020 00021 00022 namespace dai { 00023 00025 DAI_ENUM(FactorType,ISINGGAUSS,ISINGUNIFORM,EXPGAUSS,POTTS); 00026 00027 00029 00034 FactorGraph createFG( const GraphAL &G, FactorType ft, size_t states, const PropertySet &props ); 00035 00036 FactorGraph createHOIFG( size_t N, size_t M, size_t k, Real beta ); 00037 00038 BipartiteGraph createRandomBipartiteGraph( size_t N1, size_t N2, size_t d1, size_t d2 ); 00039 00040 int powmod (int x, int n, int p); 00041 00042 size_t order (int x, int p); 00043 00044 bool isPrime (size_t n); 00045 00046 BipartiteGraph createSmallLDPCGraph(); 00047 00048 BipartiteGraph createGroupStructuredLDPCGraph( size_t p, size_t j, size_t k ); 00049 00050 void createParityCheck( Real *result, size_t n, Real eps ); 00051 } // end of namespace dai 00052 00053 00054 #endif