Changeset 1907 for trunk/psLib/src/math/psPolynomial.c
- Timestamp:
- Sep 27, 2004, 1:41:42 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psPolynomial.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psPolynomial.c
r1903 r1907 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-2 5 23:05:07$9 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-27 23:41:42 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 111 111 /*****************************************************************************/ 112 112 113 static psPolynomial1D* *CreateChebyshevPolys(int maxChebyPoly) 113 /***************************************************************************** 114 CreateChebyshevPolys(n): this routine takes as input the required order n, 115 and returns as output as a pointer to an array of n psPolynomial1D 116 structures, corresponding to the first n Chebyshev polynomials. 117 118 XXX: The output should be static since the Chebyshev polynomials might be 119 used frequently and the data structure created here does not contain the 120 outer coefficients of the Chebyshev polynomials. 121 *****************************************************************************/ 122 static psPolynomial1D **CreateChebyshevPolys(int maxChebyPoly) 114 123 { 115 124 psPolynomial1D **chebPolys = NULL; … … 430 439 Polynomial coefficients will be accessed in [w][x][y][z] fashion. 431 440 432 XXX: Determine, from IfA, whether or not the "mask[]" terms should be used433 in polynomial evaluation. If so, then all of the following polynomial434 evaluation functions must be modified to do so.435 436 441 XXX: Should the "coeffErr[]" should be used as well? 437 442 *****************************************************************************/ … … 502 507 psFree(d); 503 508 return(tmp); 509 /* 510 int n; 511 int i; 512 float tmp; 513 psPolynomial1D **chebPolys = NULL; 514 515 n = myPoly->n; 516 chebPolys = CreateChebyshevPolys(n); 517 518 tmp = 0.0; 519 for (i=0;i<myPoly->n;i++) { 520 tmp+= (myPoly->coeff[i] * psPolynomial1DEval(x, chebPolys[i])); 521 } 522 tmp-= (myPoly->coeff[0]/2.0); 523 return(tmp); 524 */ 504 525 } 505 526
Note:
See TracChangeset
for help on using the changeset viewer.
