IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 24, 2006, 1:43:16 PM (20 years ago)
Author:
drobbin
Message:

Changed psArray & psVector to zero 'n' upon allocation. Used to set vector->n = nalloc.

File:
1 edited

Legend:

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

    r4951 r6484  
    122122    psRandom *myRNG = NULL;
    123123    psVector *rans = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     124    rans->n = rans->nalloc;
    124125    psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    125126
     
    167168    psRandom *myRNG = NULL;
    168169    psVector *rans = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     170    rans->n = rans->nalloc;
    169171    psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    170172
     
    214216    psRandom *myRNG = NULL;
    215217    psVector *rans = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     218    rans->n = rans->nalloc;
    216219    psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    217220
     
    259262    psRandom *myRNG = NULL;
    260263    psVector *rans00 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     264    rans00->n = rans00->nalloc;
    261265    psVector *rans01 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     266    rans01->n = rans01->nalloc;
    262267    psVector *rans02 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     268    rans02->n = rans02->nalloc;
    263269
    264270    myRNG = psRandomAlloc(PS_RANDOM_TAUS, SEED);
     
    314320    psRandom *myRNG = NULL;
    315321    psVector *rans00 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     322    rans00->n = rans00->nalloc;
    316323    psVector *rans01 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     324    rans01->n = rans01->nalloc;
    317325    psVector *rans02 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     326    rans02->n = rans02->nalloc;
    318327
    319328    myRNG = psRandomAlloc(PS_RANDOM_TAUS, SEED);
     
    357366    psRandom *myRNG = NULL;
    358367    psVector *rans00 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     368    rans00->n = rans00->nalloc;
    359369    psVector *rans01 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     370    rans01->n = rans01->nalloc;
    360371    psVector *rans02 = psVectorAlloc(NUM_DATA, PS_TYPE_F64);
     372    rans02->n = rans02->nalloc;
    361373
    362374    myRNG = psRandomAlloc(PS_RANDOM_TAUS, SEED);
Note: See TracChangeset for help on using the changeset viewer.