Changeset 5091
- Timestamp:
- Sep 21, 2005, 5:00:31 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 5 edited
-
src/math/psPolynomial.c (modified) (4 diffs)
-
test/math/tst_psFunc00.c (modified) (2 diffs)
-
test/math/tst_psFunc02.c (modified) (5 diffs)
-
test/math/verified/tst_psMinimize04.stderr (modified) (1 diff)
-
test/math/verified/tst_psMinimizeVector2D_F32.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psPolynomial.c
r5090 r5091 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.12 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-09-22 0 2:47:16$9 * @version $Revision: 1.124 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-09-22 03:00:31 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 95 95 unsigned int x = 0; 96 96 97 for (x = 0; x < poly->COOL_2D_nX; x++) {97 for (x = 0; x < (1 + poly->COOL_2D_nX); x++) { 98 98 psFree(poly->coeff[x]); 99 99 psFree(poly->coeffErr[x]); … … 110 110 unsigned int y = 0; 111 111 112 for (x = 0; x < poly->COOL_3D_nX; x++) {113 for (y = 0; y < poly->COOL_3D_nY; y++) {112 for (x = 0; x < (1 + poly->COOL_3D_nX); x++) { 113 for (y = 0; y < (1 + poly->COOL_3D_nY); y++) { 114 114 psFree(poly->coeff[x][y]); 115 115 psFree(poly->coeffErr[x][y]); … … 132 132 unsigned int z = 0; 133 133 134 for (x = 0; x < poly->COOL_4D_nX; x++) {135 for (y = 0; y < poly->COOL_4D_nY; y++) {136 for (z = 0; z < poly->COOL_4D_nZ; z++) {134 for (x = 0; x < (1 + poly->COOL_4D_nX); x++) { 135 for (y = 0; y < (1 + poly->COOL_4D_nY); y++) { 136 for (z = 0; z < (1 + poly->COOL_4D_nZ); z++) { 137 137 psFree(poly->coeff[x][y][z]); 138 138 psFree(poly->coeffErr[x][y][z]); -
trunk/psLib/test/math/tst_psFunc00.c
r5090 r5091 14 14 * orders are created. 15 15 * 16 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-09-22 02:47:16 $ 16 * XXX: Compare to FLT_EPSILON 17 * 18 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 19 * @date $Date: 2005-09-22 03:00:31 $ 18 20 * 19 21 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 131 133 return 4; 132 134 } 135 133 136 for(psS32 i = 0; i < ORDER+1; i++) { 134 137 for(psS32 j = 0; j < ORDER+2; j++) { 135 if( my2DPoly->coeff[i][j] != 0.0) {138 if(fabs(my2DPoly->coeff[i][j]) > FLT_EPSILON) { 136 139 psError(PS_ERR_UNKNOWN,true,"Coeff[%d][%d] %lg not as expected %lg", 137 140 i, j, my2DPoly->coeff[i][j], 0.0); -
trunk/psLib/test/math/tst_psFunc02.c
r4973 r5091 51 51 testStatus = false; 52 52 } 53 if ((tmpSpline->spline[i])-> n != LINEAR+1) {54 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])-> n);53 if ((tmpSpline->spline[i])->COOL_1D_n != LINEAR+1) { 54 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->COOL_1D_n); 55 55 testStatus = false; 56 56 } … … 133 133 testStatus = false; 134 134 } 135 if ((tmpSpline->spline[i])-> n != LINEAR+1) {136 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])-> n);135 if ((tmpSpline->spline[i])->COOL_1D_n != LINEAR+1) { 136 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->COOL_1D_n); 137 137 testStatus = false; 138 138 } … … 188 188 testStatus = false; 189 189 } 190 if ((tmpSpline->spline[i])-> n != CUBIC+1) {191 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])-> n);190 if ((tmpSpline->spline[i])->COOL_1D_n != CUBIC+1) { 191 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->COOL_1D_n); 192 192 testStatus = false; 193 193 } … … 270 270 testStatus = false; 271 271 } 272 if ((tmpSpline->spline[i])-> n != CUBIC+1) {273 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])-> n);272 if ((tmpSpline->spline[i])->COOL_1D_n != CUBIC+1) { 273 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->COOL_1D_n); 274 274 testStatus = false; 275 275 } … … 330 330 testStatus = false; 331 331 } 332 if ((tmpSpline->spline[i])-> n != LINEAR+1) {333 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])-> n);332 if ((tmpSpline->spline[i])->COOL_1D_n != LINEAR+1) { 333 printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->COOL_1D_n); 334 334 testStatus = false; 335 335 } -
trunk/psLib/test/math/verified/tst_psMinimize04.stderr
r4999 r5091 1 <HOST>|E|psGaussJordan (FILE:LINENO) 2 Input matrix contains NaNs. 3 <HOST>|E|psGaussJordan (FILE:LINENO) 4 Input matrix contains NaNs. 1 5 <HOST>|E|psVectorFitPolynomial2D (FILE:LINENO) 2 6 Unallowable operation: polynomial poly or its coeffs is NULL. -
trunk/psLib/test/math/verified/tst_psMinimizeVector2D_F32.stderr
r5008 r5091 1 <HOST>|E|psGaussJordan (FILE:LINENO) 2 Input matrix contains NaNs. 3 <HOST>|E|psGaussJordan (FILE:LINENO) 4 Input matrix contains NaNs. 1 5 <HOST>|E|psVectorFitPolynomial2D (FILE:LINENO) 2 6 Unallowable operation: polynomial poly or its coeffs is NULL.
Note:
See TracChangeset
for help on using the changeset viewer.
