Changeset 9740 for trunk/stac/src/stacInvertMaps.c
- Timestamp:
- Oct 24, 2006, 2:27:29 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacInvertMaps.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacInvertMaps.c
r8783 r9740 18 18 int nMaps = maps->n; // Number of maps 19 19 psArray *inverted = psArrayAlloc(nMaps); // Array of inverted maps for output 20 inverted->n = nMaps;21 20 22 21 psTrace("stac.invertMaps", 1, "Inverting maps....\n"); … … 50 49 psVector *xOut = psVectorAlloc(NUM_GRID * NUM_GRID, PS_TYPE_F32); 51 50 psVector *yOut = psVectorAlloc(NUM_GRID * NUM_GRID, PS_TYPE_F32); 52 xIn->n = NUM_GRID * NUM_GRID;53 yIn->n = NUM_GRID * NUM_GRID;54 xOut->n = NUM_GRID * NUM_GRID;55 yOut->n = NUM_GRID * NUM_GRID;56 51 57 52 // Create grid of points … … 75 70 psVector *xVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in x 76 71 psVector *yVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in y 77 xVector->n = nCoeff;78 yVector->n = nCoeff;79 72 for (int i = 0; i < nCoeff; i++) { 80 73 for (int j = 0; j < nCoeff; j++) { … … 115 108 // Solution via LU Decomposition 116 109 psVector *permutation = psVectorAlloc(nCoeff, PS_TYPE_F64); // Permutation vector for LU Decomposition 117 permutation->n = nCoeff;118 110 psImage *luMatrix = psMatrixLUD(NULL, &permutation, matrix); // LU decomposed matrix 119 111 psVector *xSolution = psMatrixLUSolve(NULL, luMatrix, xVector, permutation); // Solution in x
Note:
See TracChangeset
for help on using the changeset viewer.
