IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2740


Ignore:
Timestamp:
Dec 16, 2004, 2:18:11 PM (22 years ago)
Author:
gusciora
Message:

Set the x-vector range properly, generated new stderr and stdout.

Location:
trunk/psLib/test/dataManip
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psMinimize04b.c

    r2436 r2740  
    1111#include "psMinimize.h"
    1212#include <math.h>
    13 #define NUM_DATA 20
     13#define NUM_DATA 21
    1414#define POLY_ORDER 10
    1515#define A 2.0
     
    4747        yErr->data.F64[i] = 1.0;
    4848    }
    49     p_psNormalizeVectorRangeF64(x,0.0,1.0);
     49    p_psNormalizeVectorRangeF64(x, -1.0, 1.0);
    5050
    5151    printPositiveTestHeader(stdout,
     
    116116        y->data.F64[i] = setData(x->data.F64[i]);
    117117    }
    118     p_psNormalizeVectorRangeF64(x,0.0,1.0);
     118    p_psNormalizeVectorRangeF64(x, -1.0, 1.0);
    119119
    120120    printPositiveTestHeader(stdout,
     
    179179        y->data.F64[i] = setData(x->data.F64[i]);
    180180    }
    181     p_psNormalizeVectorRangeF64(x,0.0,1.0);
     181    p_psNormalizeVectorRangeF64(x, -1.0, 1.0);
    182182
    183183    printPositiveTestHeader(stdout,
     
    186186
    187187    psVectorFitPolynomial1D(myPoly, NULL, y, NULL);
     188    //    psVectorFitPolynomial1D(myPoly, x, y, NULL);
    188189
    189190    // We don't test the first or last few data items.
    190191    for (i=IGNORE;i<NUM_DATA-IGNORE;i++) {
    191192        double expectData = y->data.F64[i];
    192         double actualData = psPolynomial1DEval(
    193                                 myPoly,
    194                                 x->data.F64[i]
    195                             );
     193        double actualData = psPolynomial1DEval(myPoly, x->data.F64[i]);
    196194        if (fabs(actualData-expectData) > fabs(ERROR_TOLERANCE * expectData)) {
    197             printf("ERROR: Fitted data %d: (%.1f %.1f), expected was (%.1f)\n",
     195            printf("ERROR: Fitted data %d: (%.2f %.2f), expected was (%.2f)\n",
    198196                   i, x->data.F64[i], actualData, expectData);
    199197            testStatus = false;
     
    201199        //      Remove for testing since print out differs from platforms
    202200        //        } else {
    203         //            printf("Fitted data %d: (%.1f %.1f), expected was (%.1f)\n",
     201        //            printf("Fitted data %d: (%.2f %.2f), expected was (%.2f)\n",
    204202        //                   i, x->data.F64[i], actualData, expectData);
    205203        //        }
  • trunk/psLib/test/dataManip/tst_psMinimize04b_F32.c

    r2436 r2740  
    4747        yErr->data.F32[i] = 1.0;
    4848    }
    49     p_psNormalizeVectorRangeF32(x,0.0f,1.0f);
     49    p_psNormalizeVectorRangeF32(x, -1.0f, 1.0f);
    5050
    5151    printPositiveTestHeader(stdout,
     
    116116        y->data.F32[i] = setData(x->data.F32[i]);
    117117    }
    118     p_psNormalizeVectorRangeF32(x,0.0f,1.0f);
     118    p_psNormalizeVectorRangeF32(x, -1.0f, 1.0f);
    119119
    120120    printPositiveTestHeader(stdout,
     
    179179        y->data.F32[i] = setData(x->data.F32[i]);
    180180    }
    181     p_psNormalizeVectorRangeF32(x,0.0,1.0);
     181    p_psNormalizeVectorRangeF32(x, -1.0, 1.0);
    182182
    183183    printPositiveTestHeader(stdout,
  • trunk/psLib/test/dataManip/verified/tst_psMinimize04b.stderr

    r2089 r2740  
    11<DATE><TIME>|<HOST>|I|t03
    22    Following should generate an error for null arguments.
    3 <DATE><TIME>|<HOST>|E|psVectorFitPolynomial1D
    4     Unallowable operation: myPoly or its coeffs is NULL.
     3<DATE><TIME>|<HOST>|E|psVectorFitPolynomial1D (psMinimize.c:<LINENO>)
     4    Unallowable operation: polynomial myPoly or its coeffs is NULL.
  • trunk/psLib/test/dataManip/verified/tst_psMinimize04b_F32.stderr

    r2085 r2740  
    11<DATE><TIME>|<HOST>|I|t03
    22    Following should generate error for null arguments.
    3 <DATE><TIME>|<HOST>|E|psVectorFitPolynomial1D
    4     Unallowable operation: myPoly or its coeffs is NULL.
     3<DATE><TIME>|<HOST>|E|psVectorFitPolynomial1D (psMinimize.c:<LINENO>)
     4    Unallowable operation: polynomial myPoly or its coeffs is NULL.
Note: See TracChangeset for help on using the changeset viewer.