1 | #undef complex |
---|
2 | struct complex |
---|
3 | { |
---|
4 | MrBFlt re; |
---|
5 | MrBFlt im; |
---|
6 | }; |
---|
7 | |
---|
8 | typedef struct complex complex; |
---|
9 | |
---|
10 | |
---|
11 | complex **AllocateSquareComplexMatrix (int dim); |
---|
12 | MrBFlt **AllocateSquareDoubleMatrix (int dim); |
---|
13 | int **AllocateSquareIntegerMatrix (int dim); |
---|
14 | int AutodGamma (MrBFlt *M, MrBFlt rho, int K); |
---|
15 | void BetaBreaks (MrBFlt alpha, MrBFlt beta, MrBFlt *values, int K); |
---|
16 | MrBFlt BetaQuantile (MrBFlt alpha, MrBFlt beta, MrBFlt x); |
---|
17 | void CalcCijk (int dim, MrBFlt *c_ijk, MrBFlt **u, MrBFlt **v); |
---|
18 | void CopyComplexMatrices (int dim, complex **from, complex **to); |
---|
19 | void CopyDoubleMatrices (int dim, MrBFlt **from, MrBFlt **to); |
---|
20 | void DirichletRandomVariable (MrBFlt *alp, MrBFlt *z, int n, SafeLong *seed); |
---|
21 | int DiscreteGamma (MrBFlt *rK, MrBFlt alfa, MrBFlt beta, int K, int median); |
---|
22 | void FreeSquareComplexMatrix (complex **m); |
---|
23 | void FreeSquareDoubleMatrix (MrBFlt **m); |
---|
24 | void FreeSquareIntegerMatrix (int **m); |
---|
25 | int GetEigens (int dim, MrBFlt **q, MrBFlt *eigenValues, MrBFlt *eigvalsImag, MrBFlt **eigvecs, MrBFlt **inverseEigvecs, complex **Ceigvecs, complex **CinverseEigvecs); |
---|
26 | MrBFlt LnFactorial (int value); |
---|
27 | MrBFlt LnGamma (MrBFlt alp); |
---|
28 | MrBFlt LnPriorProbExponential(MrBFlt val, MrBFlt *params); |
---|
29 | MrBFlt LnPriorProbFix(MrBFlt val, MrBFlt *params); |
---|
30 | MrBFlt LnPriorProbGamma(MrBFlt val, MrBFlt *params); |
---|
31 | MrBFlt LnPriorProbLognormal(MrBFlt val, MrBFlt *params); |
---|
32 | MrBFlt LnPriorProbNormal(MrBFlt val, MrBFlt *params); |
---|
33 | MrBFlt LnPriorProbTruncatedNormal(MrBFlt val, MrBFlt *params); |
---|
34 | MrBFlt LnPriorProbUniform(MrBFlt val, MrBFlt *params); |
---|
35 | MrBFlt LnProbRatioExponential (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
36 | MrBFlt LnProbRatioGamma (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
37 | MrBFlt LnProbRatioLognormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
38 | MrBFlt LnProbRatioNormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
39 | MrBFlt LnProbRatioTruncatedNormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
40 | MrBFlt LnProbRatioUniform (MrBFlt newX, MrBFlt oldX, MrBFlt *params); |
---|
41 | MrBFlt LnProbGamma (MrBFlt alpha, MrBFlt beta, MrBFlt x); |
---|
42 | MrBFlt LnProbTruncGamma (MrBFlt alpha, MrBFlt beta, MrBFlt x, MrBFlt min, MrBFlt max); |
---|
43 | MrBFlt LnProbLogNormal (MrBFlt exp, MrBFlt sd, MrBFlt x); |
---|
44 | MrBFlt LnProbTK02LogNormal (MrBFlt mean, MrBFlt var, MrBFlt x); |
---|
45 | MrBFlt LnProbScaledGamma (MrBFlt alpha, MrBFlt x); |
---|
46 | MrBFlt LnRatioTK02LogNormal (MrBFlt exp, MrBFlt sd, MrBFlt xNew, MrBFlt xOld); |
---|
47 | MrBFlt LnRatioLogNormal (MrBFlt exp, MrBFlt sd, MrBFlt xNew, MrBFlt xOld); |
---|
48 | MrBFlt LogNormalRandomVariable (MrBFlt mean, MrBFlt var, SafeLong *seed); |
---|
49 | void MultiplyMatrices (int dim, MrBFlt **a, MrBFlt **b, MrBFlt **result); |
---|
50 | int MultiplyMatrixNTimes (int dim, MrBFlt **Mat, int power, MrBFlt **Result); |
---|
51 | MrBFlt PointNormal (MrBFlt prob); |
---|
52 | MrBFlt PsiGammaLnProb (MrBFlt alpha, MrBFlt value); |
---|
53 | MrBFlt PsiGammaLnRatio (MrBFlt alpha, MrBFlt numerator, MrBFlt denominator); |
---|
54 | MrBFlt PsiGammaRandomVariable (MrBFlt alpha, SafeLong *seed); |
---|
55 | MrBFlt QuantileGamma (MrBFlt x, MrBFlt alfa, MrBFlt beta); |
---|
56 | MrBFlt RandomNumber (SafeLong *seed); |
---|