IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2008, 2:09:04 PM (18 years ago)
Author:
eugene
Message:

merging from eam_branch_20080430 : cleanups for tests, minor fixes from tests, reduced verbosity level in some places, add UPDATE and RESET directives to MULTI and METADATA in config files

Location:
trunk/psLib/test/math
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tap_psPolyFit4D.c

    r13337 r17515  
    166166                for (int iz = 0; iz < polyOrderZ + 1; iz++) {
    167167                    for (int it = 0; it < polyOrderT + 1; it++) {
    168                         myPoly->mask[ix][iy][iz][it] = 0xff; // Mask it out
     168                        myPoly->coeffMask[ix][iy][iz][it] = 0xff; // Mask it out
    169169                    }
    170170                }
     
    173173
    174174        // Put these back in
    175         myPoly->mask[0][0][0][0] = 0;   // A
    176         myPoly->mask[1][0][0][0] = 0;   // B * x
    177         myPoly->mask[0][1][0][0] = 0;   // C * y
    178         myPoly->mask[0][0][1][0] = 0;   // D * z
    179         myPoly->mask[0][0][0][1] = 0;   // E * t
    180         myPoly->mask[1][1][0][0] = 0;   // F * xy
     175        myPoly->coeffMask[0][0][0][0] = 0;   // A
     176        myPoly->coeffMask[1][0][0][0] = 0;   // B * x
     177        myPoly->coeffMask[0][1][0][0] = 0;   // C * y
     178        myPoly->coeffMask[0][0][1][0] = 0;   // D * z
     179        myPoly->coeffMask[0][0][0][1] = 0;   // E * t
     180        myPoly->coeffMask[1][1][0][0] = 0;   // F * xy
    181181        #endif
    182182
  • trunk/psLib/test/math/tap_psPolynomial.c

    r13307 r17515  
    1616*    XXX: Compare to FLT_EPSILON
    1717*
    18 *    @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    19 *    @date $Date: 2007-05-08 06:35:16 $
     18*    @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     19*    @date $Date: 2008-05-05 00:09:04 $
    2020*
    2121*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    6161                errorFlag = true;
    6262            }
    63             if (my1DPoly->mask[i] != 0) {
    64                 diag("Mask[%d] %d not as expected %d", i, my1DPoly->mask[i], 0);
     63            if (my1DPoly->coeffMask[i] != 0) {
     64                diag("Mask[%d] %d not as expected %d", i, my1DPoly->coeffMask[i], 0);
    6565                errorFlag = true;
    6666            }
     
    135135                    errorFlag = true;
    136136                }
    137                 if (my2DPoly->mask[i][j] != 0) {
    138                     diag("Mask[%d][%d] %d not as expected %d", i, j, my2DPoly->mask[i][j], 0);
     137                if (my2DPoly->coeffMask[i][j] != 0) {
     138                    diag("Mask[%d][%d] %d not as expected %d", i, j, my2DPoly->coeffMask[i][j], 0);
    139139                    errorFlag = true;
    140140                }
     
    214214                        errorFlag = true;
    215215                    }
    216                     if (my3DPoly->mask[i][j][k] != 0) {
     216                    if (my3DPoly->coeffMask[i][j][k] != 0) {
    217217                        diag("Mask[%d][%d][%d] %d not as expected %d",
    218                              i, j, k, my3DPoly->mask[i][j][k], 0);
     218                             i, j, k, my3DPoly->coeffMask[i][j][k], 0);
    219219                        errorFlag = true;
    220220                    }
     
    301301                            errorFlag = true;
    302302                        }
    303                         if (my4DPoly->mask[i][j][k][l] != 0) {
     303                        if (my4DPoly->coeffMask[i][j][k][l] != 0) {
    304304                            diag("Mask[%d][%d][%d][%d] %d not as expected %d",
    305                                  i, j, k, l, my4DPoly->mask[i][j][k][l], 0);
     305                                 i, j, k, l, my4DPoly->coeffMask[i][j][k][l], 0);
    306306                            errorFlag = true;
    307307                        }
  • trunk/psLib/test/math/tap_psPolynomialEval1D.c

    r13308 r17515  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.9 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-05-08 06:36:51 $
     6*  @version  $Revision: 1.10 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2008-05-05 00:09:04 $
    88*
    99*  XXX: Probably should test single- and multi-dimensional polynomials in
     
    6868        for(psS32 i = 0; i < TERMS; i++) {
    6969            polyOrd->coeff[i] = poly1DCoeff[i];
    70             polyOrd->mask[i]  = poly1DMask[i];
     70            polyOrd->coeffMask[i]  = poly1DMask[i];
    7171        }
    7272
     
    9797        {
    9898            polyCheb->coeff[i] = 1.0;
    99             polyCheb->mask[i]  = poly1DMask[i];
     99            polyCheb->coeffMask[i]  = poly1DMask[i];
    100100        }
    101101        // Evaluate test points and verify results
     
    133133        {
    134134            polyOrd->coeff[i] = poly1DCoeff[i];
    135             polyOrd->mask[i]  = poly1DMask[i];
     135            polyOrd->coeffMask[i]  = poly1DMask[i];
    136136        }
    137137
     
    199199        {
    200200            polyCheb->coeff[i] = 1.0;
    201             polyCheb->mask[i]  = poly1DMask[i];
     201            polyCheb->coeffMask[i]  = poly1DMask[i];
    202202        }
    203203
  • trunk/psLib/test/math/tap_psPolynomialEval2D.c

    r13308 r17515  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.7 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-05-08 06:36:51 $
     6*  @version  $Revision: 1.8 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2008-05-05 00:09:04 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    9696            for(psS32 j = 0; j < TERMS; j++) {
    9797                polyOrd->coeff[i][j] = poly2DCoeff[i][j];
    98                 polyOrd->mask[i][j]  = poly2DMask[i][j];
     98                polyOrd->coeffMask[i][j]  = poly2DMask[i][j];
    9999            }
    100100        }
     
    131131            for(psS32 j = 0; j < TERMS; j++) {
    132132                polyCheb->coeff[i][j] = 1.0;
    133                 polyCheb->mask[i][j]  = poly2DMask[i][j];
     133                polyCheb->coeffMask[i][j]  = poly2DMask[i][j];
    134134            }
    135135        }
     
    174174            for(psS32 j = 0; j < TERMS; j++) {
    175175                polyOrd->coeff[i][j] = poly2DCoeff[i][j];
    176                 polyOrd->mask[i][j]  = poly2DMask[i][j];
     176                polyOrd->coeffMask[i][j]  = poly2DMask[i][j];
    177177            }
    178178        }
     
    268268            for(psS32 j = 0; j < TERMS; j++) {
    269269                polyCheb->coeff[i][j] = 1.0;
    270                 polyCheb->mask[i][j]  = poly2DMask[i][j];
     270                polyCheb->coeffMask[i][j]  = poly2DMask[i][j];
    271271            }
    272272        }
  • trunk/psLib/test/math/tap_psPolynomialEval3D.c

    r13308 r17515  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.8 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-05-08 06:36:51 $
     6*  @version  $Revision: 1.9 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2008-05-05 00:09:04 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    149149                for(psS32 k = 0; k < TERMS; k++) {
    150150                    polyOrd->coeff[i][j][k] = Dpoly3DCoeff[i][j][k];
    151                     polyOrd->mask[i][j][k]  = poly3DMask[i][j][k];
     151                    polyOrd->coeffMask[i][j][k]  = poly3DMask[i][j][k];
    152152                }
    153153            }
     
    188188                for(psS32 k = 0; k < TERMS; k++) {
    189189                    polyCheb->coeff[i][j][k] = 1.0;
    190                     polyCheb->mask[i][j][k]  = poly3DMask[i][j][k];
     190                    polyCheb->coeffMask[i][j][k]  = poly3DMask[i][j][k];
    191191                }
    192192            }
     
    239239                for(psS32 k = 0; k < TERMS; k++) {
    240240                    polyOrd->coeff[i][j][k] = Dpoly3DCoeff[i][j][k];
    241                     polyOrd->mask[i][j][k]  = poly3DMask[i][j][k];
     241                    polyOrd->coeffMask[i][j][k]  = poly3DMask[i][j][k];
    242242                }
    243243            }
     
    355355                for(psS32 k = 0; k < TERMS; k++) {
    356356                    polyCheb->coeff[i][j][k] = 1.0;
    357                     polyCheb->mask[i][j][k]  = poly3DMask[i][j][k];
     357                    polyCheb->coeffMask[i][j][k]  = poly3DMask[i][j][k];
    358358                }
    359359            }
  • trunk/psLib/test/math/tap_psPolynomialEval4D.c

    r13308 r17515  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-05-08 06:36:51 $
     6*  @version  $Revision: 1.7 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2008-05-05 00:09:04 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    389389                    for(psS32 l = 0; l < TERMS; l++) {
    390390                        polyOrd->coeff[i][j][k][l] = Dpoly4DCoeff[i][j][k][l];
    391                         polyOrd->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
     391                        polyOrd->coeffMask[i][j][k][l]  = poly4DMask[i][j][k][l];
    392392                    }
    393393                }
     
    428428                    for(psS32 l = 0; l < TERMS; l++) {
    429429                        polyCheb->coeff[i][j][k][l] = 1.0;
    430                         polyCheb->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
     430                        polyCheb->coeffMask[i][j][k][l]  = poly4DMask[i][j][k][l];
    431431                    }
    432432                }
     
    485485                    for(psS32 l = 0; l < TERMS; l++) {
    486486                        polyOrd->coeff[i][j][k][l] = Dpoly4DCoeff[i][j][k][l];
    487                         polyOrd->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
     487                        polyOrd->coeffMask[i][j][k][l]  = poly4DMask[i][j][k][l];
    488488                    }
    489489                }
     
    629629                    for(psS32 l = 0; l < TERMS; l++) {
    630630                        polyCheb->coeff[i][j][k][l] = 1.0;
    631                         polyCheb->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
     631                        polyCheb->coeffMask[i][j][k][l]  = poly4DMask[i][j][k][l];
    632632                    }
    633633                }
  • trunk/psLib/test/math/tap_psPolynomialUtils_Derivatives.c

    r12607 r17515  
    3333
    3434        // mask remaining elements
    35         poly->mask[2][1] = 1;
    36         poly->mask[1][2] = 1;
    37         poly->mask[2][2] = 1;
     35        poly->coeffMask[2][1] = 1;
     36        poly->coeffMask[1][2] = 1;
     37        poly->coeffMask[2][2] = 1;
    3838
    3939        psPolynomial2D *dX = psPolynomial2D_dX (NULL, poly);
     
    4646        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    4747
    48         ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
    49         ok(!dX->mask[1][0], "x^1 y^0 coeff is unmasked");
    50         ok(!dX->mask[0][1], "x^0 y^1 coeff is unmasked");
    51 
    52         ok(dX->mask[1][1], "x^1 y^1 coeff is masked");
    53         ok(dX->mask[1][2], "x^1 y^2 coeff is masked");
     48        ok(!dX->coeffMask[0][0], "x^0 y^0 coeff is unmasked");
     49        ok(!dX->coeffMask[1][0], "x^1 y^0 coeff is unmasked");
     50        ok(!dX->coeffMask[0][1], "x^0 y^1 coeff is unmasked");
     51
     52        ok(dX->coeffMask[1][1], "x^1 y^1 coeff is masked");
     53        ok(dX->coeffMask[1][2], "x^1 y^2 coeff is masked");
    5454
    5555        psFree (dX);
     
    8181
    8282        // mask remaining elements
    83         poly->mask[2][1] = 1;
    84         poly->mask[1][2] = 1;
    85         poly->mask[2][2] = 1;
     83        poly->coeffMask[2][1] = 1;
     84        poly->coeffMask[1][2] = 1;
     85        poly->coeffMask[2][2] = 1;
    8686
    8787        psPolynomial2D *dX = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 2);
     
    9595        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    9696
    97         ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
    98         ok(!dX->mask[1][0], "x^1 y^0 coeff is unmasked");
    99         ok(!dX->mask[0][1], "x^0 y^1 coeff is unmasked");
    100 
    101         ok(dX->mask[1][1], "x^1 y^1 coeff is masked");
    102         ok(dX->mask[1][2], "x^1 y^2 coeff is masked");
     97        ok(!dX->coeffMask[0][0], "x^0 y^0 coeff is unmasked");
     98        ok(!dX->coeffMask[1][0], "x^1 y^0 coeff is unmasked");
     99        ok(!dX->coeffMask[0][1], "x^0 y^1 coeff is unmasked");
     100
     101        ok(dX->coeffMask[1][1], "x^1 y^1 coeff is masked");
     102        ok(dX->coeffMask[1][2], "x^1 y^2 coeff is masked");
    103103
    104104        psFree (dX);
     
    130130
    131131        // mask remaining elements
    132         poly->mask[2][1] = 1;
    133         poly->mask[1][2] = 1;
    134         poly->mask[2][2] = 1;
     132        poly->coeffMask[2][1] = 1;
     133        poly->coeffMask[1][2] = 1;
     134        poly->coeffMask[2][2] = 1;
    135135
    136136        psPolynomial2D *result = psPolynomial2D_dX (poly, poly);
     
    163163
    164164        // mask remaining elements
    165         poly->mask[2][1] = 1;
    166         poly->mask[1][2] = 1;
    167         poly->mask[2][2] = 1;
     165        poly->coeffMask[2][1] = 1;
     166        poly->coeffMask[1][2] = 1;
     167        poly->coeffMask[2][2] = 1;
    168168
    169169        psPolynomial2D *dY = psPolynomial2D_dY (NULL, poly);
     
    176176        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    177177
    178         ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
    179         ok(!dY->mask[1][0], "x^1 y^0 coeff is unmasked");
    180         ok(!dY->mask[0][1], "x^0 y^1 coeff is unmasked");
    181 
    182         ok(dY->mask[1][1], "x^1 y^1 coeff is masked");
    183         ok(dY->mask[1][2], "x^1 y^2 coeff is masked");
     178        ok(!dY->coeffMask[0][0], "x^0 y^0 coeff is unmasked");
     179        ok(!dY->coeffMask[1][0], "x^1 y^0 coeff is unmasked");
     180        ok(!dY->coeffMask[0][1], "x^0 y^1 coeff is unmasked");
     181
     182        ok(dY->coeffMask[1][1], "x^1 y^1 coeff is masked");
     183        ok(dY->coeffMask[1][2], "x^1 y^2 coeff is masked");
    184184
    185185        psFree (dY);
     
    211211
    212212        // mask remaining elements
    213         poly->mask[2][1] = 1;
    214         poly->mask[1][2] = 1;
    215         poly->mask[2][2] = 1;
     213        poly->coeffMask[2][1] = 1;
     214        poly->coeffMask[1][2] = 1;
     215        poly->coeffMask[2][2] = 1;
    216216
    217217        psPolynomial2D *dY = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 2);
     
    225225        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    226226
    227         ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
    228         ok(!dY->mask[1][0], "x^1 y^0 coeff is unmasked");
    229         ok(!dY->mask[0][1], "x^0 y^1 coeff is unmasked");
    230 
    231         ok(dY->mask[1][1], "x^1 y^1 coeff is masked");
    232         ok(dY->mask[1][2], "x^1 y^2 coeff is masked");
     227        ok(!dY->coeffMask[0][0], "x^0 y^0 coeff is unmasked");
     228        ok(!dY->coeffMask[1][0], "x^1 y^0 coeff is unmasked");
     229        ok(!dY->coeffMask[0][1], "x^0 y^1 coeff is unmasked");
     230
     231        ok(dY->coeffMask[1][1], "x^1 y^1 coeff is masked");
     232        ok(dY->coeffMask[1][2], "x^1 y^2 coeff is masked");
    233233
    234234        psFree (dY);
     
    260260
    261261        // mask remaining elements
    262         poly->mask[2][1] = 1;
    263         poly->mask[1][2] = 1;
    264         poly->mask[2][2] = 1;
     262        poly->coeffMask[2][1] = 1;
     263        poly->coeffMask[1][2] = 1;
     264        poly->coeffMask[2][2] = 1;
    265265
    266266        psPolynomial2D *result = psPolynomial2D_dY (poly, poly);
Note: See TracChangeset for help on using the changeset viewer.