Changeset 9730 for trunk/psLib/src/math/psMinimizePolyFit.c
- Timestamp:
- Oct 24, 2006, 12:55:05 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimizePolyFit.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizePolyFit.c
r9640 r9730 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-10- 19 02:57:18$12 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-10-24 22:52:56 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 46 46 #define PS_VECTOR_GEN_CHEBY_INDEX(VEC, SIZE, TYPE) \ 47 47 VEC = psVectorAlloc(SIZE, TYPE); \ 48 VEC->n = VEC->nalloc; \49 48 if (TYPE == PS_TYPE_F64) { \ 50 49 for (psS32 i = 0 ; i < SIZE ; i++) { \ … … 93 92 if (sums == NULL) { 94 93 sums = psVectorAlloc(nSum, PS_TYPE_F64); 95 sums->n = sums->nalloc;96 94 } else if (nSum > sums->n) { 97 95 sums = psVectorRealloc(sums, nSum); 98 sums->n = sums->nalloc;96 sums->n = nSum; 99 97 } 100 98 … … 333 331 psImage *A = psImageAlloc(numTerms, numTerms, PS_TYPE_F64); // Least-squares matrix 334 332 psVector *B = psVectorAlloc(numTerms, PS_TYPE_F64); // Least-squares vector 335 B->n = numTerms;336 333 psImageInit(A, 0.0); 337 334 psVectorInit(B, 0.0); … … 509 506 psImage *A = psImageAlloc(nTerm, nTerm, PS_TYPE_F64); // Least-squares matrix 510 507 psVector *B = psVectorAlloc(nTerm, PS_TYPE_F64); // Least-squares vector 511 B->n = B->nalloc;512 508 513 509 // Initialize data structures. … … 805 801 psVector *fit = NULL; 806 802 psVector *resid = psVectorAlloc(f->n, PS_TYPE_F64); 807 resid->n = resid->nalloc;808 803 809 804 // eventual expansion: user supplies one of various stats option pairs, … … 976 971 psImage *A = psImageAlloc(nTerm, nTerm, PS_TYPE_F64); // Least-squares matrix 977 972 psVector *B = psVectorAlloc(nTerm, PS_TYPE_F64); // Least-squares vector 978 B->n = B->nalloc;979 973 980 974 // Initialize data structures. … … 1256 1250 } 1257 1251 psVector *resid = psVectorAlloc(f->n, PS_TYPE_F64); 1258 resid->n = resid->nalloc;1259 1252 1260 1253 // eventual expansion: user supplies one of various stats option pairs, … … 1434 1427 psImage *A = psImageAlloc(nTerm, nTerm, PS_TYPE_F64); // Least-squares matrix 1435 1428 psVector *B = psVectorAlloc(nTerm, PS_TYPE_F64); // Least-squares vector 1436 B->n = B->nalloc;1437 1429 1438 1430 // Initialize data structures. … … 1790 1782 psVector *fit = NULL; 1791 1783 psVector *resid = psVectorAlloc(f->n, PS_TYPE_F64); 1792 resid->n = resid->nalloc;1793 1784 1794 1785 // eventual expansion: user supplies one of various stats option pairs, … … 1967 1958 psImage *A = psImageAlloc(nTerm, nTerm, PS_TYPE_F64); // Least-squares matrix 1968 1959 psVector *B = psVectorAlloc(nTerm, PS_TYPE_F64); // Least-squares vector 1969 B->n = B->nalloc;1970 1960 1971 1961 // Initialize data structures. … … 2368 2358 psVector *fit = NULL; 2369 2359 psVector *resid = psVectorAlloc(f->n, PS_TYPE_F64); 2370 resid->n = resid->nalloc;2371 2360 2372 2361 // eventual expansion: user supplies one of various stats option pairs,
Note:
See TracChangeset
for help on using the changeset viewer.
