Changeset 7766 for trunk/psLib/src/math/psPolynomial.h
- Timestamp:
- Jun 29, 2006, 4:20:43 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psPolynomial.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psPolynomial.h
r6348 r7766 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.6 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-0 2-07 23:36:15$13 * @version $Revision: 1.63 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-06-30 02:20:06 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 307 307 308 308 309 /***************************************************************************** 310 PS_POLY macros: 311 *****************************************************************************/ 312 #define PS_ASSERT_POLY1D(NAME, RVAL) \ 313 if (false == psMemCheckPolynomial1D(NAME)) { \ 314 psError(PS_ERR_BAD_PARAMETER_NULL, true, \ 315 "Unallowable operation: argument %s is not a psPolynomial1D struct.\n",\ 316 #NAME); \ 317 return(RVAL); \ 318 } \ 319 320 #define PS_ASSERT_POLY_NON_NULL(NAME, RVAL) \ 321 if ((NAME) == NULL || (NAME)->coeff == NULL) { \ 322 psError(PS_ERR_BAD_PARAMETER_NULL, true, \ 323 "Unallowable operation: polynomial %s or its coeffs is NULL.", \ 324 #NAME); \ 325 return(RVAL); \ 326 } \ 327 328 #define PS_ASSERT_POLY_TYPE(NAME, TYPE, RVAL) \ 329 if ((NAME)->type != TYPE) { \ 330 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 331 "Unallowable operation: polynomial %s has wrong type.", #NAME); \ 332 return(RVAL); \ 333 } \ 334 335 #define PS_POLY_PRINT_1D(NAME) \ 336 printf("Poly %s: (nX) is (%d)\n", #NAME, NAME->nX);\ 337 for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\ 338 printf("%s->coeff[%d] is %f\n", #NAME, i, NAME->coeff[i]); \ 339 }\ 340 341 #define PS_POLY_PRINT_2D(NAME) \ 342 printf("Poly %s: (nX, nY) is (%d, %d)\n", #NAME, NAME->nX, NAME->nY);\ 343 for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\ 344 for (psS32 j = 0 ; j < NAME->nY+1 ; j++) {\ 345 printf("%s->coeff[%d][%d] is %f\n", #NAME, i, j, NAME->coeff[i][j]); \ 346 }\ 347 }\ 309 348 310 349 /** \} */ // End of MathGroup Functions
Note:
See TracChangeset
for help on using the changeset viewer.
