IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5091


Ignore:
Timestamp:
Sep 21, 2005, 5:00:31 PM (21 years ago)
Author:
gusciora
Message:

Polynomial nOrder nTerm change.

Location:
trunk/psLib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psPolynomial.c

    r5090 r5091  
    77*  polynomials.  It also contains a Gaussian functions.
    88*
    9 *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-09-22 02:47:16 $
     9*  @version $Revision: 1.124 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-09-22 03:00:31 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9595    unsigned int x = 0;
    9696
    97     for (x = 0; x < poly->COOL_2D_nX; x++) {
     97    for (x = 0; x < (1 + poly->COOL_2D_nX); x++) {
    9898        psFree(poly->coeff[x]);
    9999        psFree(poly->coeffErr[x]);
     
    110110    unsigned int y = 0;
    111111
    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++) {
    114114            psFree(poly->coeff[x][y]);
    115115            psFree(poly->coeffErr[x][y]);
     
    132132    unsigned int z = 0;
    133133
    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++) {
    137137                psFree(poly->coeff[x][y][z]);
    138138                psFree(poly->coeffErr[x][y][z]);
  • trunk/psLib/test/math/tst_psFunc00.c

    r5090 r5091  
    1414*    orders are created.
    1515*
    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 $
    1820*
    1921*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    131133        return 4;
    132134    }
     135
    133136    for(psS32 i = 0; i < ORDER+1; i++) {
    134137        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) {
    136139                psError(PS_ERR_UNKNOWN,true,"Coeff[%d][%d] %lg not as expected %lg",
    137140                        i, j, my2DPoly->coeff[i][j], 0.0);
  • trunk/psLib/test/math/tst_psFunc02.c

    r4973 r5091  
    5151            testStatus = false;
    5252        }
    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);
    5555            testStatus = false;
    5656        }
     
    133133            testStatus = false;
    134134        }
    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);
    137137            testStatus = false;
    138138        }
     
    188188            testStatus = false;
    189189        }
    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);
    192192            testStatus = false;
    193193        }
     
    270270            testStatus = false;
    271271        }
    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);
    274274            testStatus = false;
    275275        }
     
    330330            testStatus = false;
    331331        }
    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);
    334334            testStatus = false;
    335335        }
  • 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.
    15<HOST>|E|psVectorFitPolynomial2D (FILE:LINENO)
    26    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.
    15<HOST>|E|psVectorFitPolynomial2D (FILE:LINENO)
    26    Unallowable operation: polynomial poly or its coeffs is NULL.
Note: See TracChangeset for help on using the changeset viewer.