ac59a3a2b4b77e8ab09ed49a2b6e1c56a880ff8b
[synclust.git] / src / sources / convexSolver.h
1 #ifndef SYNCLUST_CONVEXSOLVER_H
2 #define SYNCLUST_CONVEXSOLVER_H
3
4 #include "sources/utils/boolean.h"
5
6 // auxiliary to compute euclidian norm
7 double norm2(
8 double* v,
9 int length
10 );
11
12 // auxiliary to compute euclidian distance
13 double distance2(
14 double* f1,
15 double* f2,
16 int length
17 );
18
19 // auxiliary to compute log-likelihood + penalty
20 double computeLogLikelihood(
21 double** f,
22 double* theta,
23 double** Zst,
24 double*** phi,
25 int* lengthNIix,
26 int** NIix,
27 double alpha,
28 int nrow,
29 int ncol
30 );
31
32 // structure to return parameters (theta, f) [and others if needed later]
33 typedef struct Parameters {
34 double** f;
35 double* theta;
36 } Parameters;
37
38 // compute estimated ("repaired", "smoothed"...) variations from rows of M
39 // NOTE: geographic coordinates dropped here, since they are unused
40 Parameters getVarsWithConvexOptim_core(
41 double* pM,
42 int* lengthNIix,
43 int** NIix,
44 int nrow,
45 int ncol,
46 double alpha,
47 double h,
48 double epsilon,
49 int maxiter,
50 bool symmNeighbs,
51 bool trace
52 );
53
54 #endif