# Changeset 7737 for trunk/projects/slim-curve

Ignore:
Timestamp:
08/25/11 15:55:18 (8 years ago)
Message:

Removed code that requires C99 extensions to allow compilation in Visual Studio.

File:
1 edited

Unmodified
Removed
• ## trunk/projects/slim-curve/src/main/c/EcfUtil.c

 r7710 //#include /* The 2010 version of the ECF library.  This has basically been completely rewritten to avoid license issues. completely rewritten to avoid license issues. Also, this takes account of the fact that we may be handling Poisson noise. float max; float temp; float pivotInverse[n]; float *pivotInverse = (float *)malloc(n * sizeof(float)); int i, j, k, m; /*int q, w; printf("----------\n"); if (0.0 == a[k][k]) { free(pivotInverse); return -2; // singular matrix } }*/ free(pivotInverse); return 0; } { int returnValue = 0; float identity[n][n]; float **identity = GCI_ecf_matrix(n, n); float **work = GCI_ecf_matrix(n, n); int i, j, k; } } GCI_ecf_free_matrix(work); // copy over results } } GCI_ecf_free_matrix(identity); GCI_ecf_free_matrix(work); return returnValue; } Performs an in-place Crout lower/upper decomposition of n x n matrix A. Values on or below diagonals are lowers, values about the diagonal are uppers, with an implicit 1.0 value for the diagonal are uppers, with an implicit 1.0 value for the diagonals. Returns 0 upon success, -2 if matrix is singular. int nvbl; float sum; // rearrange the elements of the b vector in place. startIndex = order[0]; for (iRow = 1; iRow < n; ++iRow) { sum = 0.0; int jCol; for (jCol = 0; jCol < iRow; ++jCol) { sum += lu[iRow][jCol] * b[jCol]; int GCI_solve_lu_decomp(float **a, int n, float *b) { int order[n]; int *order = (int *) malloc(n * sizeof(int)); int return_value = lu_decomp(a, n, order); if (return_value >= 0) { return_value = solve_lu(a, n, b, order); } free(order); return return_value; } { int returnValue; int order[n]; float identity[n][n]; int *order = (int *) malloc(n * sizeof(int)); float **identity = GCI_ecf_matrix(n, n); int i, j; } } free(order); GCI_ecf_free_matrix(identity); return returnValue; } k = mfit-1; for (j=nparam-1; j>=0; j--) for (j=nparam-1; j>=0; j--) { if (paramfree[j]) if (paramfree[j]) { for (i=0; i
Note: See TracChangeset for help on using the changeset viewer.