13 #ifndef __defined_libdai_createfg_h
14 #define __defined_libdai_createfg_h
25 DAI_ENUM(FactorType,ISINGGAUSS,ISINGUNIFORM,EXPGAUSS,POTTS);
34 FactorGraph
createFG(
const GraphAL &G, FactorType ft,
size_t states,
const PropertySet &props );
40 int powmod (
int x,
int n,
int p);
42 size_t order (
int x,
int p);
50 void createParityCheck(
Real *result,
size_t n,
Real eps );
BipartiteGraph createSmallLDPCGraph()
Constructs a regular LDPC graph with N=6, j=2, K=4, k=3.
Definition: createfg.cpp:217
FactorGraph createFG(const GraphAL &G, FactorType ft, size_t states, const PropertySet &props)
Creates a factor graph from a pairwise interactions graph.
Definition: createfg.cpp:35
BipartiteGraph createGroupStructuredLDPCGraph(size_t p, size_t j, size_t k)
Creates group-structured LDPC code.
Definition: createfg.cpp:247
double Real
Real number (alias for double, which could be changed to long double if necessary) ...
Definition: util.h:98
FactorGraph createHOIFG(size_t N, size_t M, size_t k, Real beta)
Return a random factor graph with higher-order interactions.
Definition: createfg.cpp:115
size_t order(int x, int p)
Returns order of x in GF(p) with p prime.
Definition: createfg.cpp:193
DAI_ENUM(LDPCType, SMALL, GROUP, RANDOM)
Possible LDPC structures.
int powmod(int x, int n, int p)
Returns x**n % p, assuming p is prime.
Definition: createfg.cpp:184
BipartiteGraph createRandomBipartiteGraph(size_t N1, size_t N2, size_t d1, size_t d2)
Creates a regular random bipartite graph.
Definition: createfg.cpp:149
bool isPrime(size_t n)
Returns whether n is a prime number.
Definition: createfg.cpp:207
Namespace for libDAI.
Definition: alldai.cpp:16
Defines TFactor<> and Factor classes which represent factors in probability distributions.