IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 23, 2006, 10:56:20 AM (20 years ago)
Author:
drobbin
Message:

Added verbose setting to test to turn off data values output. (causes differences btw AMD64 & 32-server)

File:
1 edited

Legend:

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

    r7160 r7181  
    1515#define NUM_DATA_POINTS 300
    1616#define NUM_PARAMS 3
     17#define VERBOSE 0
    1718float expectedParm[NUM_PARAMS];
    1819
     
    9697        coordinates->data.F32[i] = function(params, x) + 0.1 * (2.0 * psRandomGaussian(rng) - 1.0);
    9798        errors->data.F32[i] = 0.1;
    98         printf("Data %ld: (%f, %f) --> %f\n", i, x->data.F32[0], x->data.F32[1], coordinates->data.F32[i]);
     99        if (VERBOSE) {
     100            printf("Data %ld: (%f, %f) --> %f\n",
     101                   i, x->data.F32[0], x->data.F32[1], coordinates->data.F32[i]);
     102        }
    99103    }
    100104
     
    118122            float expected = function(params, x);
    119123            diff += (fitted - expected) / fabsf(expected);
    120             printf("Data point %ld: Fitted: %f, expected: %f\n", i, fitted, expected);
     124            if (VERBOSE) {
     125                printf("Data point %ld: Fitted: %f, expected: %f\n", i, fitted, expected);
     126            }
    121127            fflush(stdout);
    122128        }
Note: See TracChangeset for help on using the changeset viewer.