Changeset 6887 for trunk/stac/src/stacInvertMaps.c
- Timestamp:
- Apr 18, 2006, 12:20:45 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacInvertMaps.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacInvertMaps.c
r6450 r6887 14 14 int nMaps = maps->n; // Number of maps 15 15 psArray *inverted = psArrayAlloc(nMaps); // Array of inverted maps for output 16 inverted->n = nMaps; 16 17 17 18 psTrace("stac.invertMaps", 1, "Inverting maps....\n"); … … 45 46 psVector *xOut = psVectorAlloc(NUM_GRID * NUM_GRID, PS_TYPE_F32); 46 47 psVector *yOut = psVectorAlloc(NUM_GRID * NUM_GRID, PS_TYPE_F32); 48 xIn->n = NUM_GRID * NUM_GRID; 49 yIn->n = NUM_GRID * NUM_GRID; 50 xOut->n = NUM_GRID * NUM_GRID; 51 yOut->n = NUM_GRID * NUM_GRID; 47 52 48 53 // Create grid of points … … 66 71 psVector *xVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in x 67 72 psVector *yVector = psVectorAlloc(nCoeff, PS_TYPE_F64); // Vector for solution in y 73 xVector->n = nCoeff; 74 yVector->n = nCoeff; 68 75 for (int i = 0; i < nCoeff; i++) { 69 76 for (int j = 0; j < nCoeff; j++) { … … 104 111 // Solution via LU Decomposition 105 112 psVector *permutation = psVectorAlloc(nCoeff, PS_TYPE_F64); // Permutation vector for LU Decomposition 113 permutation->n = nCoeff; 106 114 psImage *luMatrix = psMatrixLUD(NULL, &permutation, matrix); // LU decomposed matrix 107 115 psVector *xSolution = psMatrixLUSolve(NULL, luMatrix, xVector, permutation); // Solution in x
Note:
See TracChangeset
for help on using the changeset viewer.
