libDAI
createfg.h
Go to the documentation of this file.
1 /* This file is part of libDAI - http://www.libdai.org/
2  *
3  * Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
4  *
5  * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
6  */
7 
8 
11 
12 
13 #ifndef __defined_libdai_createfg_h
14 #define __defined_libdai_createfg_h
15 
16 
17 #include <dai/factor.h>
18 #include <vector>
19 #include <map>
20 
21 
22 namespace dai {
23 
25 DAI_ENUM(FactorType,ISINGGAUSS,ISINGUNIFORM,EXPGAUSS,POTTS);
26 
27 
29 
34 FactorGraph createFG( const GraphAL &G, FactorType ft, size_t states, const PropertySet &props );
35 
36 FactorGraph createHOIFG( size_t N, size_t M, size_t k, Real beta );
37 
38 BipartiteGraph createRandomBipartiteGraph( size_t N1, size_t N2, size_t d1, size_t d2 );
39 
40 int powmod (int x, int n, int p);
41 
42 size_t order (int x, int p);
43 
44 bool isPrime (size_t n);
45 
46 BipartiteGraph createSmallLDPCGraph();
47 
48 BipartiteGraph createGroupStructuredLDPCGraph( size_t p, size_t j, size_t k );
49 
50 void createParityCheck( Real *result, size_t n, Real eps );
51 } // end of namespace dai
52 
53 
54 #endif