--- /dev/null
+#include "tests/helpers.h"
+#include "sources/convexSolver.h"
+#include "sources/neighbors.h"
+
+//test on random matrix
+void test_convexSolver1()
+{
+ int nrow=100, ncol=11;
+ //usual parameters
+ double alpha = 0.2;
+ int k = 4, gmode = 3;
+
+ // initialize M to random matrix which somewhat simulate true data repartition
+ srand(time(NULL));
+ double* M = (double*)malloc(nrow*ncol*sizeof(double));
+ // fill series first
+ for (int j=0; j<ncol-2; j++)
+ {
+ for (int i=0; i<nrow; i++)
+ M[i+nrow*j] = (double)rand()/RAND_MAX;
+ }
+ // fill coordinates
+ int minCoord[2] = { 77100.0, 1023100.0}; // X, Y
+ int maxCoord[2] = {1710200.0, 2672200.0}; // X, Y
+ for (int j=ncol-2; j<ncol; j++)
+ {
+ for (int i=0; i<nrow; i++)
+ {
+ M[i+nrow*j] = minCoord[ncol-j-1] +
+ (maxCoord[ncol-j-1]-minCoord[ncol-j-1]) * (double)rand()/RAND_MAX;
+ }
+ }
+
+ // we need neighborhoods to apply solver
+ List** NI_tmp = getNeighbors_core(M, alpha, k, gmode, S_FALSE, nrow, ncol);
+ int** NIix = (int**)malloc(nrow*sizeof(int*));
+ int* lengthNIix = (int*)malloc(nrow*sizeof(int));
+ for (int i=0; i<nrow; i++)
+ {
+ ListIterator* iterJ = list_get_iterator(NI_tmp[i]);
+ int neighbSize = list_size(NI_tmp[i]);
+ lengthNIix[i] = neighbSize;
+ NIix[i] = (int*)malloc(neighbSize*sizeof(int));
+ for (int j=0; j<neighbSize; j++)
+ {
+ int tmpNeighb; listI_get(iterJ, tmpNeighb);
+ NIix[i][j] = tmpNeighb;
+ listI_move_next(iterJ);
+ }
+ listI_destroy(iterJ);
+ list_destroy(NI_tmp[i]);
+ }
+ free(NI_tmp);
+
+ // restrict M by removing coordinates columns
+ double* M_restrict = (double*)malloc(nrow*(ncol-2)*sizeof(double));
+ for (int j=0; j<ncol-2; j++)
+ {
+ for (int i=0; i<nrow; i++)
+ M_restrict[i+nrow*j] = M[i+nrow*j];
+ }
+ free(M);
+
+ // finally apply test [TODO?]
+ double pcoef = 1.0, h = 1e-3, eps = 1e-4;
+ int maxit = 1e3;
+ Parameters params = getVarsWithConvexOptim_core(
+ M_restrict, lengthNIix, NIix, nrow, ncol-2, pcoef, h, eps, maxit, S_FALSE, S_TRUE);
+
+ // free parameters memory
+ free(M_restrict);
+ free(lengthNIix);
+ for (int i=0; i<nrow; i++)
+ free(NIix[i]);
+ free(NIix);
+
+ // free results memory
+ free(params.theta);
+ for (int i=0; i<nrow; i++)
+ free(params.f[i]);
+ free(params.f);
+}
+
+//test with real dataset (birds observations)
+void test_convexSolver2()
+{
+ int nrow=625, ncol=9;
+ //usual parameters
+ double alpha = 0.2;
+ int k = 10, gmode = 1;
+
+ // initialize M to completed data from birds observations [NO coordinates]
+ double M[] = {0.20,1.0,1.10,0.70,0.60,0.0,0.0,0.10,0.50,0.50,0.0,1.0,1.30,1.0,0.0,1.50,0.90,0.40,0.70,1.10,1.20,0.90,1.10,0.80,1.20,1.70,1.60,1.30,1.30,0.30,1.20,0.30,0.20,0.30,0.80,0.0,0.30,0.30,1.20,0.80,0.0,0.0,0.90,0.90,1.50,0.50,0.30,1.90,1.20,1.80,1.20,3.40,2.20,1.10,0.90,0.80,0.50,1.70,1.50,0.60,0.90,0.90,0.60,0.0,1.50,1.0,0.20,0.30,1.10,1.10,0.50,2.80,0.50,0.80,0.30,0.70,2.0,1.0,1.30,0.40,0.0,0.80,1.0,1.40,0.50,1.0,1.10,1.60,1.10,0.80,1.0,0.0,2.50,1.60,1.20,0.80,1.0,1.20,0.40,0.60,0.0,0.20,0.40,1.40,1.90,1.10,1.30,1.70,0.70,0.10,1.90,0.0,0.0,0.0,0.0,0.80,0.30,0.60,0.70,0.20,0.40,2.20,2.50,0.50,1.0,1.80,1.20,1.30,0.666667,0.90,1.30,0.70,1.50,0.70,0.40,1.10,0.80,0.30,1.0,1.10,2.0,1.30,1.80,0.0,1.60,0.60,0.80,1.10,0.80,2.0,1.40,2.333333,1.70,0.60,0.70,1.40,0.70,0.50,1.120,0.40,1.28750,0.08750,0.08750,0.60,1.780,1.70,2.60,1.840,0.716667,0.133333,0.30,0.0,2.0,0.144444,0.20,1.70,0.58750,0.871429,0.416667,0.30,0.614286,0.714286,0.10,1.057143,1.233333,0.90,1.433333,0.60,1.16250,2.528571,1.5250,1.36250,1.150,0.942857,1.28750,1.30,2.23750,1.70,1.316667,1.50,1.70,1.350,0.520,0.60,1.385714,1.550,0.483333,1.20,1.36250,2.30,2.0,2.7750,2.933333,2.533333,1.80,0.333333,2.21250,1.2750,1.350,1.366667,1.20,2.10,0.083333,2.3750,1.414286,1.01250,1.650,1.01250,1.23750,1.46250,0.80,0.550,0.60,0.783333,0.3250,1.10,0.620,0.80,0.483333,1.057143,0.20,0.6250,0.3250,0.033333,0.250,0.150,0.20,0.666667,1.0,0.050,0.60,1.950,0.357143,0.0750,0.871429,1.0250,1.90,0.138889,0.90,0.76250,0.90,0.350,0.840,0.183333,1.60,0.90,0.46250,0.30,0.20,1.985714,2.26250,1.040,0.7750,1.550,1.433333,1.1750,0.30,2.20,0.4750,1.20,0.950,0.850,0.314286,1.30,0.866667,0.850,0.70,1.050,1.142857,0.0,0.8750,1.40,2.20,2.250,2.0,0.10,0.0,0.828571,0.26250,0.250,1.171429,0.6250,0.4250,1.10,0.8750,1.30,1.30,0.333333,0.642857,1.1750,1.250,0.242857,1.133333,0.60,0.20,1.442857,0.31250,0.450,1.23750,0.73750,1.033333,2.20,2.3750,0.30,2.26250,1.91250,1.78750,0.50,1.16250,1.7750,2.0,1.20,1.1250,0.70,1.10,0.871429,0.950,2.814286,0.96250,0.6750,1.2750,0.5250,1.46250,1.050,0.43750,0.350,0.30,1.380,0.66250,0.483333,1.56250,1.414286,1.457143,1.33750,1.120,1.350,0.81250,0.816667,2.73750,0.80,2.91250,0.30,0.608333,1.191837,2.2250,1.98750,2.4750,2.183333,2.250,3.5750,0.614286,0.03750,0.10,0.250,0.0,1.450,1.70,1.4250,2.214286,4.60,2.5250,1.10,1.30,1.80,1.350,1.33750,2.142857,1.50,1.9750,1.750,1.085714,1.7750,1.250,0.260,1.63750,1.250,1.70,0.742857,2.11250,1.050,0.60,0.533333,0.6250,0.820,1.060,0.880,0.10,1.585714,1.250,0.633333,0.90,0.48750,0.0,0.8750,1.528571,2.750,2.060,0.68750,1.70,1.76250,2.28750,2.86250,2.23750,1.60,1.4250,0.750,0.86250,1.13750,1.48750,0.90,0.914286,0.666667,0.70,0.0,1.30,0.60,0.842857,1.742857,2.080,0.166667,0.814286,2.050,1.60,2.580,2.10,2.233333,0.985714,1.785714,1.066667,1.90,2.180,0.70,1.60,0.780,2.10,0.071429,0.70,1.066667,0.840,0.816667,0.366667,0.80,0.40,1.50,0.883333,1.433333,0.071429,0.340,0.014286,1.10,1.228571,0.90,1.233333,1.466667,0.747619,0.80,0.928571,1.30,2.014286,0.50,1.166667,0.850,0.650,0.185714,0.550,0.10,1.485714,0.485714,0.0,1.10,0.850,0.857143,0.30,0.457143,0.20,1.446032,0.50,0.80,1.10,0.966667,0.550,1.150,0.950,0.714286,1.916667,0.533333,1.866667,0.850,0.750,0.20,0.980,0.90,0.880,0.266667,1.160,0.666667,1.50,1.740,1.680,1.3250,0.666667,1.240,0.560,0.533333,0.550,0.040,1.150,0.2250,0.90,1.050,0.460,1.466667,0.10,0.350,2.483333,1.666667,0.166667,0.0,1.30,1.340,2.0,1.480,1.460,1.633333,0.70,1.020,1.1750,0.30,1.680,1.7750,1.250,0.920,1.060,0.380,1.520,0.860,0.10,1.580,0.50,1.0750,0.333333,0.40,0.0750,1.950,0.9250,0.750,0.20,1.466667,1.150,0.4750,2.60,1.633333,1.30,0.566667,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.20,0.70,0.70,0.70,0.60,0.10,0.0,0.20,0.50,0.80,0.10,0.70,0.50,0.70,0.0,0.90,0.80,0.60,0.70,0.90,1.30,1.10,1.0,0.90,1.40,2.70,1.70,1.80,2.80,0.80,0.70,0.70,0.444444,0.40,0.70,0.20,0.20,0.40,0.90,0.80,0.0,0.0,1.10,1.20,1.40,0.60,0.40,0.90,1.20,2.10,1.50,3.40,2.20,1.20,1.0,1.40,0.50,2.0,1.30,0.80,0.80,0.90,0.80,0.60,1.50,1.20,0.20,0.30,1.0,0.80,0.40,2.0,1.0,1.10,0.80,1.0,2.20,1.10,1.40,0.40,0.542857,0.80,1.10,1.40,0.50,1.0,1.10,1.10,1.20,0.50,1.228571,0.0,2.30,2.0,1.10,0.90,0.90,1.20,1.10,0.40,0.10,0.10,2.40,1.70,2.250,1.20,2.70,1.90,0.20,0.40,1.50,0.30,0.0,0.0,0.0,0.750,0.30,0.7750,0.70,0.80,0.40,2.20,2.50,0.50,1.40,1.40,1.40,1.30,0.40,0.385714,2.30,1.20,2.0,1.60,0.10,1.0,1.0,0.30,1.20,2.80,2.0,0.80,2.0,0.0,2.10,1.10,1.0,1.0,1.0,1.80,2.60,1.961905,1.80,0.70,0.850,1.0,0.70,1.40,1.20,0.20,1.20,0.0,0.0,0.60,2.70,2.20,2.40,2.30,1.0,0.0,0.30,0.0,2.30,0.10,0.20,1.0,0.20,1.0,0.30,0.20,0.30,0.60,0.10,1.10,1.50,0.80,0.30,0.20,0.60,2.90,1.40,1.80,1.20,1.40,1.10,1.0,2.80,1.90,1.10,1.50,1.60,1.30,0.80,0.30,1.10,2.30,1.10,1.20,1.80,2.10,2.40,1.80,3.20,2.90,1.90,0.30,2.30,1.10,1.30,1.50,0.90,2.40,0.0,1.80,2.10,1.30,1.80,1.0,1.30,1.50,1.10,0.30,0.70,1.10,0.10,1.0,0.70,0.80,0.70,1.30,0.20,0.70,0.0,0.0,0.10,0.10,0.10,0.40,0.90,0.0,0.90,2.50,0.10,0.0,0.80,0.50,1.60,0.10,0.90,0.70,1.10,0.30,0.80,0.0,1.70,0.90,0.60,0.20,0.20,1.40,2.60,0.30,0.60,1.60,1.40,1.30,0.40,1.40,0.60,1.90,1.60,0.60,0.30,1.30,0.90,0.90,0.60,1.0,1.0,0.0,0.90,1.40,2.20,2.60,2.10,0.0,0.0,0.50,0.50,0.20,1.0,0.80,0.60,0.90,0.90,1.30,1.40,0.70,0.90,1.30,1.0,0.30,1.50,0.50,0.20,1.90,0.10,0.50,0.60,1.0,1.10,2.20,2.10,0.20,1.60,1.50,1.60,0.50,1.40,1.70,2.10,1.20,1.0,0.70,1.30,0.60,0.80,3.20,1.30,1.0,1.30,0.60,1.50,0.80,0.0,0.30,0.30,1.0,0.60,0.50,1.70,0.60,1.40,1.10,1.10,1.10,0.90,1.10,2.30,0.90,2.30,0.30,0.70,1.10,1.90,1.70,2.20,2.60,2.30,2.80,0.40,0.0,0.30,0.30,0.0,1.90,1.80,1.30,1.60,2.30,0.80,1.10,1.20,1.30,1.30,1.50,2.10,1.60,2.10,1.60,0.50,2.0,1.0,0.40,0.80,1.10,2.30,0.70,1.30,1.10,0.20,0.40,0.40,0.70,1.0,0.70,0.0,1.90,1.20,0.70,0.90,0.60,0.0,0.60,1.70,2.60,2.0,0.30,1.50,1.30,1.80,1.80,1.90,1.60,1.10,1.10,0.90,0.80,1.0,0.90,0.50,0.666667,0.70,0.0,1.30,0.60,0.842857,1.742857,2.080,0.166667,0.814286,2.050,1.60,2.580,2.10,2.233333,0.985714,1.785714,1.066667,1.90,2.180,0.70,1.60,0.780,2.10,0.071429,0.70,1.066667,0.840,0.816667,0.366667,0.80,0.40,1.50,0.883333,1.433333,0.071429,0.340,0.014286,1.10,1.228571,0.90,1.233333,1.466667,0.747619,0.80,0.928571,1.30,2.014286,0.50,1.166667,0.850,0.650,0.185714,0.550,0.10,1.485714,0.485714,0.0,1.10,0.850,0.857143,0.30,0.457143,0.20,1.446032,0.50,0.80,1.10,0.966667,0.550,1.150,0.950,0.714286,1.916667,0.533333,1.866667,0.850,0.750,0.20,0.980,0.90,0.880,0.266667,1.160,0.666667,1.50,1.740,1.680,1.3250,0.666667,1.240,0.560,0.533333,0.550,0.040,1.150,0.2250,0.90,1.050,0.460,1.466667,0.10,0.350,2.483333,1.666667,0.166667,0.0,1.30,1.340,2.0,1.480,1.460,1.633333,0.70,1.020,1.1750,0.30,1.680,1.7750,1.250,0.920,1.060,0.380,1.520,0.860,0.10,1.580,0.50,1.0750,0.333333,0.40,0.0750,1.950,0.9250,0.750,0.20,1.466667,1.150,0.4750,2.60,1.633333,1.30,0.566667,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.10,0.90,0.50,1.0,0.80,0.050,0.10,0.150,0.50,0.650,0.10,0.850,0.50,0.70,0.0,0.80,1.40,0.50,0.50,0.80,1.70,1.40,1.80,1.60,1.20,2.10,2.20,2.80,1.70,0.80,0.90,0.20,0.40,0.50,0.80,0.20,0.10,0.60,0.90,1.10,0.0,0.0,1.0,1.050,1.30,1.40,0.60,1.0,1.40,1.950,1.50,3.40,2.20,1.0,1.0,1.98750,0.557143,2.30,1.30,0.90,0.80,1.40,0.40,0.80,1.70,1.0,0.20,0.60,0.90,1.40,0.70,2.0,0.40,1.0,0.30,1.40,1.60,1.70,1.70,0.40,0.20,0.80,0.90,1.40,0.50,1.0,1.10,1.40,1.0,0.70,0.90,0.0,2.30,2.20,0.90,1.0,0.70,1.20,0.30,0.40,0.10,0.10,2.40,2.10,2.50,1.40,2.0,1.80,0.20,0.30,1.50,0.30,0.0,0.0,0.0,0.70,0.30,1.10,0.70,0.80,0.40,2.20,2.50,0.60,1.20,1.20,0.60,1.30,0.30,0.385714,1.20,1.20,1.50,1.0,0.50,0.90,1.20,0.30,1.30,1.20,2.40,1.20,1.90,0.0,1.90,1.10,0.90,1.11250,1.0,1.60,2.0,2.0,1.60,0.70,0.850,1.10,0.70,0.40,1.0,0.20,1.40,0.10,0.10,0.60,1.60,1.70,2.70,1.50,1.20,0.10,0.10,0.0,2.30,0.0,0.20,1.90,0.80,0.70,0.40,0.20,0.40,0.50,0.20,0.80,1.30,0.90,1.60,0.70,1.40,2.50,1.90,1.50,1.10,1.10,1.70,1.80,2.0,1.70,1.30,1.50,1.70,1.40,0.40,0.50,1.40,0.80,0.70,1.20,1.60,2.30,2.50,3.40,2.60,2.10,1.90,0.60,2.40,1.60,1.40,0.90,1.30,1.90,0.0,1.90,1.30,0.90,2.0,1.0,1.10,0.80,0.90,0.80,0.60,0.90,0.50,1.10,0.50,0.80,0.70,1.70,0.20,0.70,0.10,0.10,0.20,0.40,0.30,0.80,1.10,0.10,0.30,2.30,0.60,0.20,0.70,1.10,2.30,0.0,0.60,1.0,0.90,0.40,0.60,0.50,2.20,0.90,0.60,0.20,0.20,1.90,2.60,0.40,0.90,1.550,2.10,1.50,0.60,2.20,0.30,1.50,1.10,1.10,0.10,1.30,0.80,0.80,1.20,0.40,0.90,0.0,0.60,1.40,2.20,2.30,2.50,0.0,0.0,1.0,0.20,0.10,1.30,0.60,0.30,1.40,0.60,1.30,1.40,0.10,0.80,1.0,1.30,0.30,1.10,0.60,0.20,1.50,0.50,0.40,0.80,0.60,1.20,2.20,2.20,0.30,2.0,1.60,1.70,0.50,1.10,2.60,2.50,1.20,1.1250,0.70,1.10,0.60,0.80,3.0,0.80,0.40,1.10,0.50,1.20,1.20,0.30,0.20,0.30,1.40,0.40,0.50,1.50,0.30,1.40,1.50,1.40,0.80,0.90,0.90,2.20,1.10,2.70,0.30,0.60,1.20,2.80,2.0,3.0,2.60,2.20,3.20,1.30,0.0,0.10,0.20,0.0,1.0,1.60,1.40,2.0,3.0,3.40,1.10,1.30,2.30,1.60,1.30,1.70,1.60,4.20,1.90,0.80,1.80,1.20,0.20,1.0,1.30,2.0,0.40,1.80,0.80,0.50,0.80,0.40,1.30,0.90,0.90,0.30,2.90,1.30,0.50,0.90,0.40,0.0,0.80,1.80,2.90,2.20,0.70,1.40,1.70,2.80,2.70,2.0,1.60,1.10,0.80,0.50,1.0,1.50,0.90,1.10,0.80,0.70,0.0,1.30,0.60,0.70,1.20,1.90,0.20,0.50,1.30,0.90,2.70,1.70,1.90,1.10,0.90,0.70,1.0,1.70,0.90,1.70,0.80,2.10,0.10,0.70,1.60,1.30,0.80,0.60,0.50,0.40,1.20,0.90,1.70,0.0,0.20,0.0,0.90,1.20,0.70,1.30,1.30,1.10,0.40,0.70,1.0,1.70,0.40,0.80,0.80,0.80,0.20,0.20,0.0,1.50,0.70,0.0,1.0,1.20,0.40,0.30,0.0,0.20,1.10,0.50,0.50,1.30,0.90,0.40,1.50,0.90,1.30,2.20,0.10,1.866667,0.850,0.750,0.20,0.980,0.90,0.880,0.266667,1.160,0.666667,1.50,1.740,1.680,1.3250,0.666667,1.240,0.560,0.533333,0.550,0.040,1.150,0.2250,0.90,1.050,0.460,1.466667,0.10,0.350,2.483333,1.666667,0.166667,0.0,1.30,1.340,2.0,1.480,1.460,1.633333,0.70,1.020,1.1750,0.30,1.680,1.7750,1.250,0.920,1.060,0.380,1.520,0.860,0.10,1.580,0.50,1.0750,0.333333,0.40,0.0750,1.950,0.9250,0.750,0.20,1.466667,1.150,0.4750,2.60,1.633333,1.30,0.566667,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.30,1.20,1.20,1.0,0.666667,0.050,0.0,0.150,0.50,0.650,0.10,0.850,0.50,0.70,0.0,1.10,1.10,0.40,0.50,0.60,0.60,1.20,1.40,1.20,0.70,2.0,2.50,2.30,1.80,0.60,0.80,0.50,0.348148,0.40,0.80,0.0,0.40,0.50,1.0,0.7750,0.0,0.0,1.0,1.050,1.20,0.80,0.50,1.10,1.10,1.950,0.90,3.40,2.20,0.90,0.60,0.60,0.30,1.10,1.366667,1.10,0.60,1.10,0.70,0.60,1.0,0.70,0.60,0.50,1.0,1.40,0.80,2.266667,1.0,0.966667,0.30,1.40,2.30,2.50,2.10,0.40,0.30,0.50,0.70,1.40,0.50,0.90,1.10,1.10,1.70,0.80,1.0,0.0,2.366667,1.933333,1.066667,2.10,1.40,1.20,0.80,0.60,0.0,0.30,1.40,2.0,2.250,1.30,2.0,1.80,0.50,0.40,1.633333,0.20,0.0,0.0,0.0,0.750,0.30,0.80,0.70,0.60,0.40,2.20,2.50,0.60,1.30,1.50,1.30,1.30,0.455556,0.40,1.40,1.0750,1.70,1.60,0.60,1.20,1.0,0.30,1.60,1.30,1.80,1.20,1.90,0.0,1.866667,1.40,0.90,1.10,1.10,2.40,2.0,1.30,1.60,0.80,0.850,1.30,0.70,1.10,2.30,0.50,1.30,0.30,0.10,0.60,1.10,1.30,2.60,1.70,0.50,0.133333,0.50,0.0,2.0,0.20,0.20,1.80,0.70,1.10,0.30,0.30,0.80,0.30,0.10,1.10,0.90,0.60,2.40,0.60,1.30,2.20,1.10,1.50,1.150,1.40,1.30,0.90,2.0,1.90,1.80,1.50,1.90,1.350,0.50,0.30,1.90,1.550,0.483333,1.20,1.80,2.80,1.30,3.70,2.80,2.40,1.50,0.10,2.30,1.2750,1.80,1.366667,1.30,2.20,0.0,1.80,1.40,1.0,1.30,1.30,0.80,1.40,0.50,0.550,0.50,0.80,0.50,1.40,0.50,0.80,0.70,0.90,0.20,1.0,0.50,0.0,0.10,0.0,0.10,1.0,1.0,0.0,0.60,2.30,0.20,0.10,1.20,1.30,2.10,0.30,0.60,0.70,0.70,0.10,0.840,0.30,0.90,0.90,0.50,0.20,0.20,1.80,2.20,1.20,1.10,1.550,0.80,1.0,0.50,1.70,0.40,1.40,1.20,0.850,0.50,1.30,0.90,0.850,0.60,0.80,1.10,0.0,1.0,1.40,2.20,2.20,1.90,0.0,0.0,1.0,0.30,0.40,1.30,0.60,0.30,1.20,0.90,1.30,1.0,0.20,0.50,0.80,1.10,0.30,1.0,0.60,0.20,1.30,0.60,0.80,1.40,0.80,0.80,2.20,2.60,0.30,2.10,2.30,2.0,0.50,1.50,1.60,1.60,1.20,1.50,0.70,1.0,1.0,1.30,2.90,0.90,0.50,1.30,0.30,1.70,0.90,0.20,0.20,0.30,1.70,0.70,0.40,1.70,1.20,1.70,1.20,0.90,1.70,0.90,1.20,2.10,0.80,2.50,0.30,0.666667,1.0,2.0,1.70,1.60,2.50,2.250,4.10,0.50,0.20,0.10,0.250,0.0,1.450,1.70,1.20,1.50,3.50,3.10,1.10,1.60,1.80,1.350,1.0,2.142857,1.30,1.60,1.750,1.10,1.40,1.20,0.10,1.60,1.60,1.30,0.20,2.20,1.050,0.80,0.40,1.10,0.60,1.50,1.10,0.0,1.585714,1.250,0.70,0.90,1.0,0.0,0.60,1.70,2.750,2.060,1.0,1.70,1.60,2.50,3.30,2.10,1.60,1.20,0.60,1.10,0.90,2.0,0.90,0.70,0.666667,0.70,0.0,1.30,0.60,0.50,1.60,2.20,0.20,0.80,1.20,0.10,2.0,1.80,2.60,1.20,1.60,1.066667,2.20,2.60,0.90,1.40,0.20,0.80,0.0,0.40,0.80,0.30,0.80,0.20,0.60,0.40,1.10,0.883333,1.20,0.0,0.50,0.0,1.30,1.20,0.90,1.233333,1.90,0.80,0.80,1.30,1.50,2.20,0.60,0.90,0.90,0.50,0.20,0.90,0.20,0.90,0.50,0.0,0.60,0.850,0.40,0.30,0.60,0.20,1.30,0.50,0.70,1.0,1.10,0.70,0.80,1.0,0.50,1.80,0.30,2.0,0.90,0.90,0.20,0.80,0.70,1.0,0.30,0.80,1.50,1.50,1.20,1.70,1.30,0.60,1.30,0.30,0.60,0.70,0.10,1.20,0.20,0.90,0.70,0.60,1.80,0.20,0.40,2.30,1.50,0.10,0.0,1.20,1.340,2.0,1.480,1.460,1.633333,0.70,1.020,1.1750,0.30,1.680,1.7750,1.250,0.920,1.060,0.380,1.520,0.860,0.10,1.580,0.50,1.0750,0.333333,0.40,0.0750,1.950,0.9250,0.750,0.20,1.466667,1.150,0.4750,2.60,1.633333,1.30,0.566667,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.70,1.70,0.30,1.20,0.666667,0.050,0.0,0.150,0.50,0.650,0.20,0.850,1.20,0.70,0.0,0.70,1.10,0.90,0.80,1.10,0.90,1.20,1.60,1.10,1.80,2.1250,2.20,1.10,1.70,0.50,1.0,0.20,0.348148,0.40,1.10,0.0,0.50,0.360,0.90,0.60,0.0,0.0,1.0,1.050,1.0,0.50,0.450,0.90,1.2250,1.950,1.2750,3.40,2.20,1.30,1.0,2.60,0.60,1.30,1.366667,0.70,1.40,1.60,1.10,0.60,0.80,1.20,0.40,0.10,0.90,1.30,0.70,2.266667,0.90,0.966667,0.90,1.50,0.50,2.0,1.80,0.40,0.40,0.90,0.90,1.40,0.50,1.10,1.10,1.20,1.250,0.20,1.30,0.0,2.366667,1.933333,1.066667,1.50,1.0,1.20,0.90,0.70,0.20,0.20,1.30,2.20,2.250,1.20,2.0,1.80,1.20,0.357143,1.633333,0.10,0.0,0.0,0.0,0.750,0.30,0.60,0.70,0.60,0.40,2.20,2.50,0.80,1.30,0.666667,1.1250,1.30,0.455556,0.40,1.628571,1.20,1.60,1.30,0.40,1.40,1.0,0.30,2.80,1.30,2.0,1.40,1.90,0.0,1.866667,1.40,0.90,0.80,0.90,1.70,2.0,1.90,1.50,0.70,1.0,0.70,0.70,1.0,0.70,0.30,1.20,0.20,0.30,0.60,1.70,1.90,2.90,1.70,0.50,0.30,0.30,0.0,1.90,0.20,0.20,1.80,0.60,0.60,0.416667,0.30,0.40,0.80,0.10,0.90,1.233333,0.90,1.433333,0.80,1.10,2.50,1.60,1.20,1.150,0.70,1.10,1.40,2.80,1.50,1.0,1.50,1.70,1.350,0.60,0.50,1.385714,1.550,0.60,1.20,0.90,3.30,2.50,2.20,2.70,2.40,1.80,0.333333,2.60,1.2750,1.60,1.70,1.20,2.30,0.10,2.60,1.30,1.20,1.40,1.0,1.30,1.70,0.90,0.550,0.60,0.70,0.20,1.10,0.60,0.80,0.20,0.80,0.20,0.30,0.3250,0.033333,0.60,0.0,0.10,0.40,1.0,0.050,0.60,1.50,0.20,0.10,0.90,1.80,1.60,0.10,1.20,1.0,0.90,0.30,0.840,0.10,1.60,0.90,0.40,0.30,0.20,2.10,1.60,1.50,0.90,1.50,1.433333,0.60,0.40,2.20,0.60,0.80,0.950,0.850,0.314286,1.30,0.866667,0.850,0.40,1.050,1.80,0.0,0.80,1.40,2.20,2.40,1.70,0.0,0.0,0.80,0.10,0.20,1.70,0.6250,0.4250,1.10,1.0,1.30,1.10,0.333333,0.40,1.0,1.30,0.10,0.90,0.60,0.20,0.90,0.10,0.20,1.10,0.90,1.033333,2.20,2.50,0.40,2.30,2.10,2.20,0.50,0.90,1.70,1.60,1.20,1.0,0.70,1.0,0.80,0.80,2.60,0.70,0.50,0.90,0.30,1.40,0.70,0.60,0.60,0.30,1.10,0.70,0.50,1.70,1.414286,1.10,1.30,1.20,1.90,1.10,0.80,2.60,0.80,3.20,0.30,0.90,1.50,2.70,2.30,3.10,1.70,2.250,2.50,0.70,0.10,0.0,0.250,0.0,1.450,1.70,1.40,2.0,4.30,2.80,1.10,1.30,1.80,0.80,1.50,2.10,1.50,2.30,1.750,1.40,2.0,1.40,0.50,1.70,1.40,2.0,1.0,2.50,1.0,0.90,0.533333,0.60,0.50,1.0,1.0,0.10,1.70,1.250,0.633333,0.90,0.20,0.0,1.10,1.528571,2.750,1.70,0.70,1.80,1.60,1.80,2.90,2.30,1.60,2.20,0.50,1.10,1.50,1.70,0.90,1.10,0.666667,0.70,0.0,1.30,0.60,0.50,1.50,1.90,0.10,1.0,2.050,1.60,2.70,2.40,2.10,0.90,1.70,1.40,1.90,2.10,0.80,1.60,1.20,2.10,0.0,0.70,0.80,0.70,0.50,0.366667,1.10,0.40,1.50,0.60,1.40,0.0,0.30,0.0,0.90,1.20,1.10,1.30,1.40,1.0,0.80,0.80,1.30,1.70,0.30,1.20,0.850,0.650,0.30,0.550,0.10,1.50,0.30,0.0,1.50,0.50,0.50,0.30,0.40,0.20,1.50,0.50,0.90,0.80,0.90,0.550,1.150,0.950,0.60,1.916667,0.533333,2.90,0.90,0.60,0.10,0.80,0.90,0.80,0.20,0.80,0.10,1.50,1.50,1.80,1.40,0.60,1.20,0.50,0.80,0.50,0.0,1.70,0.40,0.90,1.40,0.460,1.50,0.0,0.30,2.90,2.90,0.20,0.0,1.30,0.60,1.70,1.10,1.70,1.70,0.70,1.0,0.90,0.30,1.80,1.70,1.30,0.80,0.40,0.40,1.40,0.80,0.10,1.70,0.80,1.0750,0.333333,0.40,0.0750,1.950,0.9250,0.750,0.20,1.466667,1.150,0.4750,2.60,1.633333,1.30,0.566667,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.70,1.40,0.60,1.60,0.666667,0.050,0.0,0.150,0.50,0.650,0.0,0.850,0.70,0.70,0.0,0.60,0.80,0.80,0.60,1.30,0.80,1.20,1.70,1.0,1.30,2.1250,2.40,1.860,2.50,0.90,1.0,0.60,0.348148,0.40,0.70,0.0,0.10,0.360,0.50,0.60,0.0,0.0,1.0,1.050,1.20,1.0,0.450,1.10,1.2250,1.950,1.2750,3.40,2.20,1.50,0.80,3.0,0.557143,1.60,1.366667,0.90,1.40,1.50,1.10,0.30,1.70,1.40,0.0,0.60,0.70,0.90,1.40,2.266667,0.90,0.966667,0.30,1.20,1.720,1.20,1.40,0.40,0.80,0.30,0.90,1.40,0.50,1.028571,1.10,1.30,1.250,0.40,1.0,0.0,2.366667,1.933333,1.066667,1.10,1.60,1.20,0.80,0.533333,0.080,0.180,1.60,2.20,2.250,1.20,2.0,1.80,0.90,0.357143,1.633333,0.10,0.0,0.0,0.0,0.750,0.30,0.7750,0.70,0.60,0.40,2.20,2.50,0.70,1.50,1.313333,1.1250,1.30,0.455556,0.60,1.0,1.0750,1.8250,1.240,0.40,1.16250,1.0,0.30,1.580,1.60,2.0,1.50,1.90,0.0,1.866667,1.30,0.90,1.20,1.028571,2.0,2.0,2.30,1.70,0.70,0.850,1.10,0.70,0.90,1.120,0.50,1.30,0.10,0.0,0.60,1.80,1.40,2.40,2.0,0.40,0.133333,0.30,0.0,2.0,0.20,0.20,1.70,0.60,1.20,0.416667,0.40,0.60,1.0,0.10,1.0,1.233333,0.90,1.433333,0.70,1.10,2.90,1.50,2.10,1.150,0.70,1.40,1.40,2.0,1.60,1.20,1.50,1.40,1.350,0.520,0.70,1.20,1.550,0.50,1.20,1.40,1.80,1.90,2.7750,3.40,2.90,1.90,0.333333,1.50,1.30,1.0,1.366667,1.50,2.10,0.10,4.20,1.40,0.50,2.10,0.70,1.20,1.60,0.60,0.550,0.60,0.783333,0.3250,0.90,0.80,0.80,0.20,0.90,0.20,0.30,0.70,0.033333,0.10,0.20,0.0,0.666667,1.0,0.050,0.60,2.20,0.40,0.10,0.90,1.50,1.90,0.222222,0.70,0.70,0.90,0.40,0.70,0.10,1.60,0.90,0.30,0.30,0.20,1.90,2.20,1.80,1.0,1.550,1.433333,0.80,0.20,3.50,0.4750,1.0,0.30,0.850,0.50,1.30,0.866667,0.850,0.70,1.050,1.10,0.0,0.70,1.40,2.20,1.90,1.20,0.10,0.0,0.70,0.10,0.30,1.0,0.6250,0.4250,1.10,1.0,1.30,1.10,0.333333,0.40,1.50,1.0,0.50,0.90,0.60,0.20,1.40,0.20,0.40,1.70,0.50,1.033333,2.20,2.50,0.30,2.40,1.80,1.90,0.50,1.20,1.70,1.50,1.20,1.0,0.70,1.10,1.0,1.20,2.814286,0.80,0.60,1.10,0.30,1.60,1.30,0.80,0.10,0.30,1.70,0.80,0.50,1.20,1.80,1.70,1.40,1.0,1.30,0.50,0.30,3.50,0.40,3.10,0.30,0.50,1.40,2.40,2.10,2.4750,2.0,2.250,5.20,0.80,0.0,0.10,0.250,0.0,1.450,1.70,1.50,2.70,5.70,2.90,1.10,1.40,1.80,1.70,1.20,2.20,1.50,1.30,1.750,1.10,1.80,0.90,0.10,1.70,1.20,1.40,1.10,2.60,1.30,0.60,0.533333,0.6250,1.0,0.90,0.70,0.10,0.80,1.250,0.633333,0.90,0.20,0.0,1.0,1.40,2.750,2.10,0.60,1.90,2.20,2.30,2.40,2.30,1.60,1.60,0.80,0.90,1.10,1.50,0.90,0.914286,0.666667,0.70,0.0,1.30,0.60,0.90,2.40,1.80,0.166667,0.60,2.050,1.20,2.60,2.40,2.50,1.20,1.90,1.10,2.20,1.90,0.20,1.30,0.780,3.40,0.0,1.0,1.066667,0.70,1.40,0.30,0.60,0.40,1.70,0.80,1.433333,0.30,0.40,0.0,1.50,1.20,0.90,0.90,1.60,0.70,0.80,0.90,1.40,1.90,0.50,2.0,0.850,0.650,0.20,0.550,0.10,1.30,0.30,0.0,0.90,0.850,0.90,0.30,0.50,0.20,1.666667,0.50,0.80,1.30,0.966667,0.550,1.150,0.950,0.70,2.0,0.50,1.866667,0.850,0.750,0.10,1.0,1.0,1.0,0.30,1.0,0.666667,1.50,1.80,1.70,1.10,0.60,1.20,0.70,0.30,0.60,0.10,1.30,0.30,0.90,1.050,0.50,1.40,0.10,0.350,2.90,1.10,0.10,0.0,1.30,0.90,2.10,0.90,1.30,2.0,0.70,1.0,2.20,0.30,1.90,1.7750,0.90,0.80,1.60,0.40,1.40,0.40,0.0,1.20,0.20,0.90,0.50,0.40,0.0,1.80,1.10,0.80,0.20,1.40,1.10,0.60,2.60,2.0,1.30,0.50,1.20,2.60,0.70,1.80,1.350,1.766667,0.70,0.50,0.50,1.0,1.10,0.033333,0.40,0.80,0.60,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.80,1.30,0.90,1.20,0.666667,0.050,0.0,0.150,0.50,0.650,0.0,0.850,0.80,0.70,0.0,0.90,0.70,0.90,0.60,1.40,1.0,1.40,1.60,1.0,0.80,2.1250,1.70,1.860,2.30,0.90,1.0,0.416667,0.348148,0.40,1.30,0.10,0.10,0.360,0.50,1.0,0.0,0.0,1.0,1.050,0.90,0.90,0.450,1.20,1.2250,1.950,1.2750,3.40,2.20,1.40,0.90,1.70,0.60,1.80,1.366667,0.90,1.40,1.20,1.50,1.30,1.20,1.083333,0.50,0.70,1.40,1.40,0.90,2.266667,1.10,0.966667,0.70,2.10,1.720,1.80,2.0,0.40,0.90,0.70,1.30,1.40,0.50,1.20,1.10,1.60,1.250,0.30,1.60,0.0,2.366667,1.933333,1.066667,1.40,1.0,1.20,0.60,0.50,0.080,0.180,1.10,2.40,2.250,1.20,2.0,1.80,0.60,0.30,1.633333,0.166667,0.0,0.0,0.0,0.750,0.30,0.7750,0.70,0.60,0.40,2.20,2.50,0.90,1.0,1.313333,1.1250,1.30,0.455556,0.30,1.628571,1.0750,2.10,1.240,0.40,0.60,1.0,0.30,1.580,1.5750,1.60,1.40,1.90,0.0,1.866667,1.10,0.90,0.90,1.028571,1.10,2.0,1.961905,1.70,0.70,0.850,1.10,0.70,0.60,1.120,0.60,1.40,0.0,0.10,0.60,1.780,1.70,2.60,1.840,0.70,0.133333,0.30,0.0,1.80,0.20,0.20,2.0,0.80,0.40,0.60,0.30,0.70,1.20,0.0,1.50,1.233333,1.10,1.433333,0.60,1.50,2.528571,1.40,1.0,1.150,0.70,1.0,1.20,2.10,1.60,1.50,1.50,1.70,1.350,0.30,0.70,1.50,1.550,0.483333,1.20,1.10,2.10,1.80,2.7750,2.90,2.50,1.80,0.333333,2.40,1.10,1.0,1.366667,1.0,2.10,0.30,2.20,1.0,1.50,1.0,0.90,1.40,2.0,0.80,0.550,0.60,0.80,0.3250,1.10,0.620,0.80,0.40,1.10,0.20,1.0,0.3250,0.033333,0.50,0.20,0.60,0.666667,1.0,0.050,0.60,1.40,0.20,0.0,0.70,0.60,1.90,0.111111,1.0,0.40,0.90,0.60,1.0,0.183333,1.60,0.90,0.60,0.20,0.20,2.10,2.0,1.040,0.30,1.550,1.433333,1.50,0.10,2.20,0.4750,1.0,0.70,0.850,0.10,1.30,0.866667,0.850,0.70,1.050,1.142857,0.0,1.20,1.40,2.20,1.80,1.90,0.0,0.0,0.90,0.30,0.30,1.0,0.50,0.50,0.90,0.80,1.30,1.80,0.333333,0.80,1.10,1.50,0.242857,1.40,0.60,0.20,1.60,0.20,0.40,1.10,0.70,1.033333,2.20,2.40,0.30,2.20,2.0,2.20,0.50,0.80,1.40,2.50,1.20,1.1250,0.70,1.10,1.0,0.90,2.40,0.80,0.50,1.0,0.70,0.90,1.10,0.60,0.40,0.30,1.380,0.70,0.483333,1.30,2.0,1.457143,0.90,1.120,1.40,0.90,0.60,2.30,0.80,3.70,0.30,0.60,1.142857,2.0,1.90,2.4750,2.183333,2.250,3.40,0.614286,0.0,0.0,0.250,0.0,1.450,1.70,1.0,2.60,5.20,2.80,1.10,0.90,1.80,1.350,1.20,2.70,1.50,1.60,1.750,1.0,1.70,1.50,0.260,2.20,1.30,1.40,1.0,2.20,1.050,0.60,0.533333,0.6250,0.820,1.060,0.880,0.10,1.80,1.250,0.40,0.90,0.60,0.0,0.90,1.30,2.750,2.30,0.70,1.80,2.10,2.30,2.90,2.50,1.60,1.70,0.60,0.60,1.0,1.60,0.90,1.0,0.666667,0.70,0.0,1.30,0.60,1.0,2.10,2.60,0.166667,0.80,2.90,1.60,2.90,2.20,1.90,1.0,2.10,1.066667,1.50,2.60,0.70,2.30,0.80,2.10,0.20,0.70,1.066667,1.20,0.70,0.366667,1.0,0.40,2.10,1.20,1.433333,0.10,0.30,0.0,1.30,1.0,0.90,1.30,1.20,0.0,0.80,1.20,1.30,2.10,0.40,1.10,0.850,0.650,0.0,0.550,0.10,1.50,0.60,0.0,1.50,0.850,1.30,0.30,0.50,0.20,1.555556,0.50,0.90,1.40,0.966667,0.550,1.150,0.950,0.70,1.70,0.50,1.866667,0.850,0.750,0.30,1.0,0.90,0.80,0.20,1.40,0.666667,1.50,2.10,1.50,1.50,1.0,1.40,0.70,0.20,0.20,0.0,0.40,0.0,0.90,1.050,0.20,1.50,0.10,0.350,2.50,1.40,0.20,0.0,1.50,1.80,1.90,1.70,1.30,1.20,0.70,1.20,1.1750,0.30,1.80,1.90,1.250,1.0,0.60,0.30,1.70,1.30,0.40,0.90,0.50,1.20,0.40,0.40,0.20,2.10,1.30,0.90,0.20,1.40,1.20,0.30,2.60,1.40,1.30,0.566667,1.20,2.60,0.70,1.80,1.40,1.30,0.60,0.40,0.30,0.60,1.10,0.0,0.60,0.80,0.40,1.90,1.450,1.450,0.40,0.950,1.50,1.30,1.250,0.30,0.650,1.850,1.150,0.0,0.20,1.650,2.0,0.450,1.450,0.40,1.20,0.50,0.950,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.60,1.30,0.757143,1.0,0.666667,0.050,0.0,0.150,0.50,0.650,0.0,0.850,1.40,0.70,0.0,1.0,1.10,0.80,1.0,1.10,0.90,1.30,1.50,1.0,1.20,2.1250,1.90,1.860,2.50,0.90,1.10,0.416667,0.348148,0.40,0.50,0.40,0.60,0.0,0.80,0.90,0.0,0.0,1.0,1.050,1.50,0.80,0.450,0.80,1.2250,1.950,1.2750,3.40,2.20,1.80,0.60,3.0,0.60,1.90,1.366667,1.10,0.90,1.40,1.50,0.70,1.50,1.083333,0.50,0.40,0.90,1.30,0.60,2.266667,0.80,0.966667,0.90,1.31250,1.720,1.66250,1.70,0.40,1.20,1.0,0.70,1.40,0.50,1.028571,1.10,1.33750,1.250,0.51250,1.228571,0.0,2.366667,1.933333,1.066667,1.40,1.10,1.20,0.70,0.533333,0.080,0.180,1.40,1.50,2.60,1.10,2.0,1.80,0.80,0.60,1.633333,0.166667,0.0,0.0,0.0,0.750,0.30,0.7750,0.70,0.60,0.40,2.20,2.50,0.50,1.40,1.313333,1.1250,1.30,0.455556,0.10,1.70,1.0750,1.30,1.240,0.40,1.70,1.0,0.30,1.580,1.70,2.10,1.0,1.90,0.0,1.866667,1.20,0.90,1.50,1.20,1.90,2.0,2.60,1.90,0.70,0.850,1.10,0.70,1.30,1.120,0.30,1.20,0.0,0.10,0.60,1.780,1.70,2.60,1.840,0.716667,0.133333,0.30,0.0,2.0,0.144444,0.20,1.60,0.60,1.10,0.30,0.40,1.10,0.60,0.10,1.0,1.233333,1.10,1.433333,0.60,0.90,2.40,1.50,0.60,1.150,0.60,1.0,1.0,1.70,1.90,1.316667,1.50,1.70,1.350,0.520,1.10,1.30,1.550,0.0,1.20,1.0,2.0,2.20,2.7750,2.933333,2.533333,1.80,0.333333,1.70,1.2750,1.350,1.366667,1.20,2.40,0.083333,2.40,1.414286,0.70,2.0,1.0,1.60,1.30,0.80,0.550,0.60,0.40,0.3250,1.10,0.620,0.80,0.483333,1.057143,0.20,0.50,0.3250,0.033333,0.20,0.10,0.20,0.80,1.0,0.10,0.60,1.90,0.80,0.0,0.90,0.80,1.90,0.138889,0.80,0.80,0.90,0.40,0.840,0.183333,1.60,0.90,0.40,0.40,0.20,2.70,2.50,1.040,0.90,1.550,1.433333,1.30,0.20,2.20,0.4750,0.90,0.80,0.850,0.30,1.30,0.866667,0.850,0.70,1.050,1.20,0.0,0.80,1.40,2.20,2.60,2.10,0.10,0.0,0.828571,0.20,0.250,1.171429,0.6250,0.4250,1.10,0.80,1.30,1.90,0.333333,0.70,1.20,1.40,0.10,1.133333,1.30,0.20,1.50,0.40,0.40,1.50,0.70,1.033333,2.20,2.0,0.30,2.70,1.80,0.90,0.50,0.80,1.50,1.70,1.20,1.1250,0.70,1.10,0.871429,0.70,3.40,1.30,1.0,1.70,0.80,1.50,0.70,0.50,0.40,0.30,1.380,0.70,0.50,1.70,1.90,1.40,1.60,1.120,1.20,0.40,0.816667,2.90,0.80,2.90,0.30,0.30,1.0,2.0,2.30,2.4750,1.70,2.250,4.20,0.40,0.0,0.10,0.250,0.0,1.450,1.70,2.10,2.214286,4.60,2.50,1.10,1.30,1.80,1.350,1.40,2.0,1.50,1.10,1.50,1.70,1.30,1.30,0.260,2.10,1.10,1.80,0.80,2.50,1.050,0.60,0.533333,0.6250,0.820,1.060,0.880,0.10,0.90,1.250,0.70,0.90,0.40,0.0,0.80,1.30,2.750,2.060,0.80,1.50,1.50,2.20,3.40,2.20,1.60,1.30,0.70,1.0,1.40,1.10,0.90,0.90,0.80,0.70,0.0,1.30,0.60,1.10,1.50,2.080,0.166667,0.70,2.80,2.80,2.580,2.10,2.40,0.60,1.40,1.066667,2.60,2.180,0.70,1.50,0.780,2.10,0.0,0.70,1.066667,0.840,0.70,0.366667,1.0,0.40,1.50,0.90,1.433333,0.10,0.340,0.10,0.90,1.0,0.90,1.30,1.40,1.30,0.80,1.10,1.30,1.90,0.50,1.0,0.850,0.650,0.20,0.550,0.10,2.10,0.50,0.0,1.10,0.850,1.20,0.30,0.70,0.20,1.444444,0.50,0.80,0.80,0.966667,0.550,1.150,0.950,0.50,1.90,0.90,1.866667,0.80,0.750,0.10,1.30,1.10,0.80,0.40,1.160,0.666667,1.50,1.740,1.70,1.3250,0.70,1.240,0.60,0.70,0.60,0.0,1.150,0.2250,0.90,1.050,0.40,1.10,0.10,0.350,2.10,1.80,0.20,0.0,1.20,1.50,2.10,1.60,1.30,1.633333,0.70,1.10,0.90,0.30,1.80,1.60,1.30,1.0,1.20,0.30,1.60,0.70,0.0,1.60,0.40,1.50,0.10,0.40,0.0,1.950,0.80,0.70,0.20,1.466667,1.10,0.40,2.60,1.50,1.30,0.60,1.20,2.60,0.70,1.80,1.30,2.0,0.70,0.60,0.70,1.10,1.10,0.10,0.30,0.90,0.80,1.90,1.30,1.60,0.60,1.30,1.50,1.30,1.10,0.30,0.50,2.10,0.80,0.0,0.20,1.50,2.0,0.50,1.50,0.40,1.20,0.60,1.10,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20,0.90,1.30,0.757143,1.0,0.666667,0.050,0.0,0.150,0.50,0.650,0.10,0.850,0.90,0.40,0.0,0.90,0.80,0.60,1.0,1.30,1.0,1.10,1.20,0.90,1.50,2.1250,2.0250,1.860,2.40,1.30,1.30,0.416667,0.348148,0.40,1.20,0.0,0.28750,0.360,0.50,0.40,0.0,0.0,1.0,1.050,1.80,0.70,0.450,0.70,1.2250,1.950,1.2750,3.40,2.20,1.30,0.70,2.80,0.80,2.0,1.366667,1.50,0.70,1.50,1.30,0.80,1.30,1.083333,0.0,0.20,1.40,1.70,0.90,2.266667,1.20,0.966667,0.56250,1.20,1.720,2.0,1.90,0.40,0.542857,1.0,0.60,1.40,0.50,1.0,1.10,1.40,1.250,0.40,1.80,0.0,2.366667,1.933333,1.066667,1.60,1.30,1.20,0.80,0.533333,0.080,0.180,1.30,1.93750,2.0,1.10,2.0,1.80,1.0,0.40,1.633333,0.166667,0.0,0.0,0.0,0.750,0.30,0.7750,0.70,0.60,0.40,2.20,2.50,0.80,1.20,1.313333,1.1250,1.30,0.455556,0.0,2.50,1.0750,2.90,1.240,0.40,1.40,1.0,0.30,1.580,1.60,1.40,1.60,1.90,0.0,1.866667,1.30,0.90,1.30,1.20,1.80,2.0,1.30,1.68750,0.70,0.850,1.10,0.70,0.90,0.40,0.60,1.30,0.0,0.0,0.60,1.780,1.70,2.60,1.840,0.716667,0.133333,0.30,0.0,1.70,0.111111,0.20,1.80,0.40,0.871429,0.60,0.30,0.614286,0.714286,0.10,1.057143,1.233333,0.90,1.433333,0.60,1.40,2.30,1.80,1.20,1.150,0.942857,1.70,1.70,2.50,1.50,1.316667,1.50,1.90,1.350,0.520,0.70,1.30,1.550,0.0,1.20,1.30,2.0,1.40,2.7750,2.933333,2.533333,1.80,0.333333,2.50,1.2750,1.350,1.366667,1.20,1.40,0.083333,2.10,1.40,1.0,1.60,1.20,1.20,1.40,0.80,0.550,0.60,0.783333,0.3250,1.10,0.620,0.80,0.483333,0.70,0.20,0.50,0.3250,0.033333,0.20,0.20,0.20,0.60,1.0,0.050,0.60,1.50,0.357143,0.10,0.871429,0.60,1.90,0.138889,1.40,0.80,0.90,0.30,1.10,0.10,1.60,0.90,0.30,0.60,0.20,1.985714,2.40,1.040,0.50,1.550,1.433333,1.40,0.0,2.20,0.4750,1.10,0.950,0.850,0.40,1.30,0.866667,0.850,0.70,2.0,0.90,0.0,1.0,1.40,2.20,2.20,2.60,0.60,0.0,0.90,0.40,0.250,0.90,0.6250,0.4250,1.10,1.0,1.30,0.70,0.333333,0.642857,1.50,1.40,0.10,1.133333,0.0,0.20,1.442857,0.40,0.50,1.70,0.70,1.033333,2.20,2.70,0.30,2.80,2.20,1.80,0.50,1.60,2.0,2.50,1.20,1.1250,0.70,1.10,1.10,1.10,2.20,1.10,0.90,1.80,0.70,1.90,1.70,0.50,0.60,0.30,1.380,0.70,0.483333,1.70,2.10,1.50,1.70,1.120,1.40,0.90,0.816667,4.0,0.80,2.90,0.30,0.60,1.191837,2.0,1.90,2.4750,2.183333,2.250,3.20,0.20,0.0,0.10,0.250,0.0,1.450,1.70,1.50,3.10,8.20,1.90,1.10,1.40,1.80,1.350,1.60,2.20,1.50,1.60,2.0,1.085714,2.20,1.50,0.260,2.0,1.0,1.40,0.742857,1.80,1.050,0.60,0.533333,0.6250,0.820,1.060,0.880,0.10,1.10,1.250,0.80,0.90,0.50,0.0,1.20,1.50,2.750,2.060,0.70,2.0,2.10,2.60,3.50,2.60,1.60,1.20,0.90,0.80,1.40,1.50,0.90,1.10,0.40,0.70,0.0,1.30,0.60,1.20,1.90,2.080,0.166667,1.30,2.050,3.0,2.580,2.10,2.233333,0.90,2.90,1.066667,1.90,2.180,0.70,1.40,0.90,2.10,0.20,0.70,1.066667,0.840,0.816667,0.366667,0.80,0.40,1.40,0.90,1.433333,0.0,0.340,0.0,0.90,1.80,0.90,1.30,1.466667,0.333333,1.20,0.50,1.30,2.60,0.80,1.166667,0.850,0.650,0.20,0.550,0.10,1.60,0.50,0.0,1.10,0.850,1.30,0.30,0.50,0.20,1.555556,0.50,1.0,1.10,0.966667,0.550,1.150,0.950,0.70,1.90,0.90,0.70,0.80,0.750,0.40,0.980,0.80,0.880,0.20,1.80,0.40,1.50,2.10,1.680,1.3250,0.50,1.10,0.560,0.60,0.70,0.040,1.150,0.2250,0.90,1.050,0.60,1.50,0.10,0.350,2.20,1.30,0.20,0.0,1.30,1.90,2.20,2.10,1.70,1.633333,0.70,0.80,0.70,0.30,1.10,1.90,1.50,1.0,1.50,0.50,1.50,1.10,0.0,2.50,0.60,0.70,0.333333,0.40,0.10,1.950,0.50,0.60,0.20,1.60,1.20,0.60,2.60,1.633333,1.30,0.60,1.20,2.60,0.70,1.80,1.350,2.0,0.80,0.50,0.50,1.30,1.10,0.0,0.30,0.70,0.60,1.90,1.60,1.30,0.20,0.60,1.50,1.30,1.40,0.30,0.80,1.60,1.50,0.0,0.20,1.80,2.0,0.40,1.40,0.40,1.20,0.40,0.80,0.20,1.30,1.0,1.90,0.60,0.70,0.70,0.30,0.40,1.90,0.90,0.90,1.50,1.20};
+
+ // initialize neighborhoods as preprocessed (elsewhere...)
+ int lengthNIix[] = {3,4,4,3,2,3,4,3,4,3,4,3,4,3,3,4,4,3,3,4,4,2,4,4,3,4,3,3,4,3,4,3,4,4,4,4,3,3,4,4,4,3,3,3,3,3,4,3,4,4,3,3,4,4,4,3,2,3,4,4,4,4,3,4,4,4,3,3,3,3,2,2,4,4,3,4,4,3,4,4,4,4,4,4,4,4,4,3,3,3,3,4,3,3,3,4,4,3,4,4,4,4,4,4,2,2,4,4,2,3,4,4,3,4,4,3,4,4,4,4,4,4,3,4,4,3,4,3,3,3,4,3,4,4,4,4,3,4,4,3,3,4,4,3,3,4,3,4,4,3,4,4,4,4,4,4,4,3,4,3,4,3,3,4,4,4,4,4,3,4,4,3,3,4,3,4,3,4,4,2,3,4,2,3,3,3,4,3,4,4,3,3,3,4,4,4,4,4,4,4,3,3,2,3,3,3,4,4,4,4,3,4,3,4,3,4,4,3,3,4,3,4,3,3,3,4,4,3,3,4,4,2,3,3,4,4,2,3,3,4,4,4,4,3,3,3,4,4,4,4,4,4,4,4,4,3,4,3,4,4,4,3,3,3,3,3,3,4,3,4,4,3,3,4,4,4,4,4,4,4,3,4,3,4,3,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,3,3,3,4,4,4,3,4,4,3,3,4,3,4,4,4,4,4,4,4,4,3,4,3,3,4,3,3,3,4,4,3,3,3,3,3,2,4,3,4,4,4,3,2,3,2,3,4,4,3,3,3,4,4,4,4,4,3,4,4,2,3,4,3,4,4,3,3,2,4,3,1,2,1,4,3,4,3,3,4,4,4,4,4,4,4,3,3,4,4,4,4,4,3,4,3,4,3,3,4,4,3,4,4,4,3,3,3,3,3,3,3,3,3,3,4,4,2,2,3,3,3,3,4,4,3,3,2,4,3,4,3,4,4,4,3,4,4,4,3,3,2,2,3,3,3,2,4,4,4,3,3,3,4,3,4,4,3,2,4,3,4,2,3,4,4,4,3,4,3,4,4,3,3,3,4,4,4,4,2,4,4,2,3,4,4,2,4,3,4,2,2,3,3,3,3,4,3,4,4,4,3,3,3,3,4,4,4,4,3,3,2,4,3,3,3,4,4,4,4,4,2,3,4,4,2,2,4,4,4,3,4,3,3,3,4,3,4,4,3,4,4,3,3,3,4,4,4,1,4,3,2,3,3,2,4,3,3,3,4,4,4,3,4,4,4,3,3,3,4,3,3,3,2,4,3,2,3,3,4,4,4,4,3,4,4,4,2,3,4,4,3,4,3,4,3,3,4,4,2,2,4,4,2,4,3,3,3,3,2,4,4,4,4,3,3,3,3,3,4,4,3,3,3};
+ int NIix_tmp[625][4] =
+ {
+ {79,431,4,-1},
+ {3,568,542,331},
+ {431,4,82,83},
+ {4,1,431,-1},
+ {432,318,-1,-1},
+ {161,40,488,-1},
+ {162,611,488,40},
+ {506,489,373,-1},
+ {9,169,433,240},
+ {433,515,128,-1},
+ {171,244,170,468},
+ {433,515,129,-1},
+ {127,174,242,615},
+ {171,169,245,-1},
+ {174,588,406,-1},
+ {148,20,502,503},
+ {147,20,118,23},
+ {116,187,16,-1},
+ {181,187,178,-1},
+ {21,187,115,184},
+ {21,15,18,512},
+ {184,148,-1,-1},
+ {23,175,419,214},
+ {512,198,22,16},
+ {542,273,201,-1},
+ {150,561,210,49},
+ {420,422,140,-1},
+ {561,49,150,-1},
+ {83,386,504,224},
+ {232,514,234,-1},
+ {514,510,231,333},
+ {234,612,89,-1},
+ {33,238,593,245},
+ {32,8,247,592},
+ {262,260,38,39},
+ {468,243,240,10},
+ {615,243,41,-1},
+ {615,36,41,-1},
+ {615,13,247,464},
+ {615,464,168,163},
+ {466,615,5,261},
+ {263,162,40,-1},
+ {43,447,616,-1},
+ {42,616,48,-1},
+ {303,43,265,-1},
+ {616,265,510,-1},
+ {562,580,440,301},
+ {265,304,48,-1},
+ {44,580,265,303},
+ {416,471,279,26},
+ {578,606,55,-1},
+ {492,270,452,-1},
+ {269,270,492,452},
+ {50,105,596,614},
+ {56,50,280,592},
+ {50,126,107,-1},
+ {54,592,-1,-1},
+ {457,104,577,-1},
+ {64,616,44,65},
+ {62,333,73,469},
+ {62,469,333,290},
+ {69,595,65,300},
+ {335,59,290,-1},
+ {616,70,304,314},
+ {61,303,65,69},
+ {73,131,61,86},
+ {267,544,500,-1},
+ {289,267,137,-1},
+ {303,265,136,-1},
+ {61,303,131,-1},
+ {290,137,-1,-1},
+ {536,613,-1,-1},
+ {290,137,73,304},
+ {136,288,290,138},
+ {555,278,561,-1},
+ {154,519,78,229},
+ {555,279,564,78},
+ {78,429,75,-1},
+ {291,75,472,519},
+ {318,331,525,329},
+ {317,159,81,327},
+ {319,431,317,79},
+ {319,81,2,320},
+ {319,103,326,24},
+ {542,423,504,380},
+ {331,545,319,425},
+ {616,580,333,90},
+ {528,90,237,-1},
+ {543,206,90,-1},
+ {333,31,335,-1},
+ {334,88,62,-1},
+ {344,601,581,618},
+ {618,556,598,-1},
+ {598,618,556,-1},
+ {547,598,97,-1},
+ {96,124,97,94},
+ {97,399,623,496},
+ {350,479,348,-1},
+ {529,481,607,482},
+ {611,101,7,374},
+ {488,372,161,533},
+ {372,488,533,161},
+ {578,606,596,389},
+ {83,590,504,221},
+ {614,274,-1,-1},
+ {596,606,-1,-1},
+ {270,596,606,492},
+ {104,596,566,492},
+ {109,105,-1,-1},
+ {108,492,456,-1},
+ {606,269,596,518},
+ {494,479,349,597},
+ {574,415,502,-1},
+ {112,574,415,502},
+ {112,574,415,502},
+ {574,118,417,-1},
+ {120,411,415,180},
+ {118,502,184,115},
+ {117,182,415,18},
+ {560,116,181,558},
+ {181,116,17,417},
+ {502,178,184,415},
+ {502,184,178,-1},
+ {496,348,497,349},
+ {608,584,623,95},
+ {499,457,515,-1},
+ {127,593,515,567},
+ {459,169,499,-1},
+ {129,169,592,-1},
+ {169,173,238,-1},
+ {139,502,86,64},
+ {501,69,60,-1},
+ {58,315,139,501},
+ {115,73,137,306},
+ {500,520,116,311},
+ {410,131,502,288},
+ {131,410,73,-1},
+ {501,314,520,502},
+ {73,410,574,502},
+ {86,118,135,-1},
+ {416,540,415,-1},
+ {413,470,414,310},
+ {416,140,144,471},
+ {311,116,268,-1},
+ {574,142,575,-1},
+ {574,147,414,119},
+ {558,575,574,-1},
+ {574,16,15,414},
+ {575,147,15,574},
+ {26,144,199,-1},
+ {503,575,210,189},
+ {214,365,416,422},
+ {350,226,472,229},
+ {555,154,430,479},
+ {397,399,555,597},
+ {429,399,564,97},
+ {393,399,398,397},
+ {156,494,479,-1},
+ {432,4,79,555},
+ {432,80,4,-1},
+ {472,82,541,83},
+ {5,263,488,-1},
+ {41,611,7,-1},
+ {506,490,372,37},
+ {165,292,521,594},
+ {164,167,465,521},
+ {292,506,594,366},
+ {164,292,594,465},
+ {508,617,38,-1},
+ {129,13,173,242},
+ {433,242,129,10},
+ {433,10,14,-1},
+ {407,567,498,-1},
+ {174,14,169,406},
+ {173,14,8,-1},
+ {22,197,577,521},
+ {297,282,507,-1},
+ {507,192,297,176},
+ {560,17,118,18},
+ {182,537,-1,-1},
+ {116,500,122,-1},
+ {120,116,18,19},
+ {118,179,-1,-1},
+ {185,116,21,-1},
+ {118,441,21,-1},
+ {410,187,117,-1},
+ {450,444,560,576},
+ {17,259,185,-1},
+ {343,338,75,363},
+ {196,575,364,166},
+ {22,198,418,-1},
+ {199,446,214,-1},
+ {503,559,194,-1},
+ {446,512,503,198},
+ {195,191,199,192},
+ {23,512,198,192},
+ {150,189,293,166},
+ {190,473,589,175},
+ {559,23,473,22},
+ {559,191,151,473},
+ {599,385,542,-1},
+ {599,24,387,-1},
+ {203,562,-1,-1},
+ {202,510,31,-1},
+ {42,265,613,-1},
+ {447,562,595,-1},
+ {562,544,202,42},
+ {528,332,514,510},
+ {214,49,342,149},
+ {49,364,599,150},
+ {150,49,365,-1},
+ {561,142,421,199},
+ {360,415,421,-1},
+ {150,189,212,26},
+ {365,151,49,-1},
+ {361,575,176,503},
+ {450,294,256,422},
+ {590,381,621,-1},
+ {590,621,381,-1},
+ {591,518,542,621},
+ {272,427,542,-1},
+ {223,28,83,386},
+ {553,83,51,-1},
+ {221,389,104,-1},
+ {218,382,275,-1},
+ {624,564,227,497},
+ {624,554,352,495},
+ {354,155,154,-1},
+ {354,227,229,-1},
+ {228,495,291,392},
+ {354,597,305,399},
+ {234,543,-1,-1},
+ {29,462,231,-1},
+ {232,461,544,-1},
+ {232,236,31,461},
+ {237,332,30,29},
+ {232,31,-1,-1},
+ {463,462,31,-1},
+ {593,33,247,-1},
+ {8,593,617,615},
+ {242,170,567,499},
+ {8,247,32,238},
+ {240,433,299,615},
+ {35,567,41,-1},
+ {10,245,169,-1},
+ {244,13,468,-1},
+ {240,40,13,243},
+ {13,615,33,464},
+ {405,506,473,565},
+ {371,619,374,565},
+ {594,619,512,258},
+ {367,594,473,256},
+ {187,257,18,179},
+ {257,178,259,179},
+ {259,258,185,18},
+ {254,259,258,-1},
+ {294,576,445,420},
+ {276,187,487,-1},
+ {254,576,185,250},
+ {254,512,276,474},
+ {615,168,39,567},
+ {467,37,299,-1},
+ {34,464,12,-1},
+ {41,161,467,-1},
+ {595,616,510,-1},
+ {47,449,580,-1},
+ {46,302,267,-1},
+ {266,314,66,562},
+ {470,412,278,-1},
+ {51,516,110,107},
+ {52,106,614,57},
+ {518,590,542,-1},
+ {220,382,275,-1},
+ {274,219,24,389},
+ {273,275,590,389},
+ {606,274,50,224},
+ {257,259,250,487},
+ {291,597,599,305},
+ {597,561,230,574},
+ {519,142,208,76},
+ {50,283,614,-1},
+ {570,577,284,297},
+ {617,176,215,-1},
+ {570,577,287,285},
+ {617,578,570,-1},
+ {570,287,578,521},
+ {617,578,570,297},
+ {578,283,539,238},
+ {73,301,309,265},
+ {66,267,613,-1},
+ {72,63,60,-1},
+ {277,597,472,561},
+ {446,507,473,197},
+ {294,256,189,251},
+ {293,473,190,251},
+ {296,282,299,-1},
+ {589,295,298,-1},
+ {508,176,521,281},
+ {296,617,466,37},
+ {298,617,242,261},
+ {303,265,61,477},
+ {307,288,46,-1},
+ {307,266,313,-1},
+ {310,69,265,-1},
+ {301,308,72,47},
+ {478,471,392,310},
+ {305,312,48,137},
+ {301,574,313,-1},
+ {304,520,113,305},
+ {310,73,304,58},
+ {392,312,306,-1},
+ {302,137,412,-1},
+ {112,574,310,471},
+ {302,520,112,-1},
+ {311,501,70,112},
+ {312,142,306,137},
+ {79,598,527,83},
+ {598,479,432,81},
+ {83,160,568,579},
+ {83,82,2,85},
+ {579,331,569,424},
+ {330,579,569,538},
+ {321,325,423,-1},
+ {569,83,327,505},
+ {423,325,321,-1},
+ {504,83,324,-1},
+ {423,325,424,330},
+ {526,579,525,-1},
+ {526,568,320,-1},
+ {79,526,325,-1},
+ {321,329,423,504},
+ {79,82,320,84},
+ {207,235,544,-1},
+ {613,86,89,-1},
+ {528,90,562,-1},
+ {528,613,62,-1},
+ {491,569,538,-1},
+ {322,534,-1,-1},
+ {343,291,188,201},
+ {341,4,74,-1},
+ {338,291,343,357},
+ {339,343,74,357},
+ {291,343,208,200},
+ {201,359,341,-1},
+ {91,618,-1,-1},
+ {344,530,485,-1},
+ {485,602,-1,-1},
+ {605,94,600,-1},
+ {496,349,479,497},
+ {623,123,460,393},
+ {97,495,623,-1},
+ {97,156,432,-1},
+ {305,354,227,-1},
+ {354,352,227,390},
+ {228,230,392,352},
+ {531,600,584,480},
+ {481,529,530,602},
+ {359,561,192,599},
+ {577,292,49,-1},
+ {357,363,599,192},
+ {570,358,292,49},
+ {486,281,-1,-1},
+ {357,176,281,-1},
+ {486,283,357,362},
+ {366,210,189,-1},
+ {214,199,175,486},
+ {570,617,364,559},
+ {251,368,576,-1},
+ {594,576,369,-1},
+ {166,122,-1,-1},
+ {619,371,248,374},
+ {619,370,374,-1},
+ {100,-1,-1,-1},
+ {374,163,-1,-1},
+ {488,-1,-1,-1},
+ {550,549,545,569},
+ {550,549,538,-1},
+ {538,376,621,220},
+ {516,387,283,-1},
+ {127,589,383,-1},
+ {381,534,79,103},
+ {428,426,377,590},
+ {220,273,542,381},
+ {599,382,387,201},
+ {387,383,343,382},
+ {387,389,382,200},
+ {387,221,599,52},
+ {389,201,386,-1},
+ {606,577,591,-1},
+ {577,273,384,51},
+ {477,353,470,310},
+ {477,315,352,470},
+ {310,354,477,471},
+ {156,494,349,479},
+ {554,438,531,-1},
+ {624,564,608,227},
+ {624,554,495,-1},
+ {154,156,494,97},
+ {97,429,623,-1},
+ {154,155,564,-1},
+ {573,584,608,402},
+ {572,556,608,584},
+ {573,496,608,-1},
+ {508,405,474,594},
+ {405,594,403,473},
+ {248,474,39,297},
+ {585,14,127,-1},
+ {127,587,498,-1},
+ {588,498,129,-1},
+ {588,610,128,-1},
+ {136,500,441,-1},
+ {500,112,122,-1},
+ {574,558,116,-1},
+ {574,471,120,-1},
+ {142,49,147,-1},
+ {113,557,118,-1},
+ {49,140,120,26},
+ {120,113,558,15},
+ {149,145,-1,-1},
+ {146,22,-1,-1},
+ {120,422,26,-1},
+ {199,120,211,-1},
+ {575,214,189,-1},
+ {324,79,103,-1},
+ {84,538,427,331},
+ {621,426,83,545},
+ {427,545,85,-1},
+ {377,426,220,-1},
+ {381,591,-1,-1},
+ {494,154,155,479},
+ {555,399,97,-1},
+ {4,81,317,3},
+ {568,158,555,-1},
+ {171,11,169,174},
+ {522,624,44,352},
+ {436,624,439,475},
+ {624,440,434,-1},
+ {434,43,229,624},
+ {622,478,352,434},
+ {509,435,522,43},
+ {436,46,475,-1},
+ {410,184,502,-1},
+ {410,115,-1,-1},
+ {118,410,-1,-1},
+ {410,116,186,-1},
+ {186,120,444,-1},
+ {199,150,512,-1},
+ {265,88,-1,-1},
+ {511,42,30,332},
+ {42,265,333,612},
+ {216,256,422,445},
+ {591,275,553,-1},
+ {516,614,283,-1},
+ {456,106,458,-1},
+ {578,52,457,617},
+ {513,107,592,-1},
+ {614,459,453,240},
+ {593,127,239,566},
+ {127,240,614,-1},
+ {456,8,-1,-1},
+ {349,230,154,624},
+ {232,237,236,-1},
+ {237,232,543,202},
+ {231,87,-1,-1},
+ {262,240,41,-1},
+ {615,567,163,164},
+ {468,245,261,5},
+ {615,261,263,35},
+ {40,35,161,-1},
+ {47,613,60,73},
+ {392,279,574,-1},
+ {305,49,519,574},
+ {291,154,188,568},
+ {248,197,594,-1},
+ {199,404,594,-1},
+ {522,523,510,-1},
+ {79,432,327,94},
+ {392,44,352,303},
+ {391,42,477,58},
+ {97,429,317,598},
+ {600,482,-1,-1},
+ {480,604,601,581},
+ {581,618,583,582},
+ {530,601,-1,-1},
+ {618,605,529,-1},
+ {605,547,572,581},
+ {363,283,365,214},
+ {259,371,-1,-1},
+ {506,100,533,161},
+ {7,374,615,-1},
+ {374,533,248,99},
+ {336,425,-1,-1},
+ {517,578,-1,-1},
+ {582,509,564,-1},
+ {157,351,74,-1},
+ {229,97,430,-1},
+ {402,584,583,-1},
+ {622,348,482,607},
+ {610,408,457,-1},
+ {593,592,127,240},
+ {134,410,72,116},
+ {137,410,116,131},
+ {121,112,137,-1},
+ {150,192,560,-1},
+ {84,381,326,-1},
+ {551,426,222,-1},
+ {7,488,41,248},
+ {508,292,177,403},
+ {559,539,403,168},
+ {434,493,460,266},
+ {207,203,616,-1},
+ {616,528,203,-1},
+ {23,259,-1,-1},
+ {455,592,107,492},
+ {30,544,233,-1},
+ {240,13,615,-1},
+ {452,492,110,-1},
+ {106,614,516,57},
+ {591,271,606,388},
+ {471,279,75,354},
+ {134,314,136,58},
+ {589,567,297,617},
+ {524,42,-1,-1},
+ {475,42,440,-1},
+ {523,522,42,440},
+ {432,317,327,423},
+ {321,79,-1,-1},
+ {323,316,-1,-1},
+ {207,335,87,511},
+ {581,600,484,604},
+ {607,582,483,345},
+ {623,572,91,-1},
+ {582,607,483,602},
+ {490,374,611,-1},
+ {376,381,321,-1},
+ {621,376,590,-1},
+ {137,179,118,112},
+ {137,122,112,-1},
+ {621,620,85,424},
+ {508,281,589,199},
+ {305,142,112,-1},
+ {432,97,160,568},
+ {84,24,219,1},
+ {207,88,232,-1},
+ {335,206,514,-1},
+ {375,538,551,-1},
+ {375,621,538,320},
+ {346,618,485,92},
+ {281,577,361,175},
+ {424,-1,-1,-1},
+ {376,538,549,336},
+ {545,381,491,-1},
+ {381,491,-1,-1},
+ {621,376,569,-1},
+ {623,396,401,-1},
+ {494,430,-1,-1},
+ {97,92,111,532},
+ {142,268,119,-1},
+ {412,49,119,-1},
+ {508,199,404,-1},
+ {178,415,150,558},
+ {25,359,278,338},
+ {264,42,206,334},
+ {590,103,518,-1},
+ {399,225,354,349},
+ {250,404,249,374},
+ {513,596,52,107},
+ {240,465,521,-1},
+ {432,476,1,-1},
+ {323,376,527,-1},
+ {366,361,577,284},
+ {623,608,124,-1},
+ {608,605,95,-1},
+ {123,97,349,-1},
+ {114,145,-1,-1},
+ {150,26,144,178},
+ {487,254,619,-1},
+ {281,389,-1,-1},
+ {284,102,454,-1},
+ {327,318,325,-1},
+ {86,65,289,48},
+ {529,484,481,582},
+ {532,581,485,607},
+ {485,496,482,347},
+ {346,484,401,-1},
+ {408,406,586,609},
+ {406,609,409,588},
+ {406,409,588,609},
+ {408,586,-1,-1},
+ {521,508,243,-1},
+ {219,451,563,428},
+ {451,220,217,103},
+ {238,513,459,-1},
+ {456,457,454,239},
+ {250,368,403,-1},
+ {265,86,205,58},
+ {516,105,457,-1},
+ {75,291,278,-1},
+ {79,479,94,327},
+ {340,200,387,357},
+ {355,547,-1,-1},
+ {483,547,-1,-1},
+ {618,601,483,344},
+ {91,547,532,355},
+ {481,485,-1,-1},
+ {584,496,401,484},
+ {274,224,52,-1},
+ {623,572,529,-1},
+ {572,531,484,-1},
+ {409,610,498,-1},
+ {498,409,-1,-1},
+ {488,263,162,101},
+ {510,202,332,205},
+ {448,205,264,334},
+ {566,57,454,458},
+ {40,38,41,-1},
+ {86,45,469,-1},
+ {285,578,298,-1},
+ {547,484,91,-1},
+ {371,576,250,-1},
+ {375,549,538,491},
+ {217,425,535,553},
+ {607,349,438,-1},
+ {349,396,608,-1},
+ {396,622,436,-1}
+ };
+ int** NIix = (int**)malloc(nrow*sizeof(int*));
+ for (int i=0; i<nrow; i++)
+ {
+ NIix[i] = (int*)malloc(lengthNIix[i]*sizeof(int));
+ for (int j=0; j<lengthNIix[i]; j++)
+ NIix[i][j] = NIix_tmp[i][j];
+ }
+
+ // main call to LL minimization
+ double pcoef = 1.0, h = 1e-2, eps = 1e-3;
+ int maxit = 1e2;
+ Parameters params = getVarsWithConvexOptim_core(
+ M, lengthNIix, NIix, nrow, ncol, pcoef, h, eps, maxit, S_TRUE, S_TRUE);
+
+ // free neighborhoods parameters arrays
+ for (int i=0; i<nrow; i++)
+ free(NIix[i]);
+ free(NIix);
+
+ // free results memory
+ free(params.theta);
+ for (int i=0; i<nrow; i++)
+ free(params.f[i]);
+ free(params.f);
+}