IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4083


Ignore:
Timestamp:
Jun 1, 2005, 1:51:25 PM (21 years ago)
Author:
evanalst
Message:

Fix psRandomAlloc to set type and seed properly.

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psRandom.c

    r3264 r4083  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-02-17 19:26:23 $
     12*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-01 23:51:25 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969        if(seed == 0) {
    7070            gsl_rng_set(myRNG->gsl,p_psRandomGetSystemSeed());
     71        } else {
     72            gsl_rng_set(myRNG->gsl,seed);
    7173        }
     74        myRNG->type = type;
    7275        break;
    7376
     
    7881        break;
    7982    }
     83
    8084    return(myRNG);
    8185}
  • trunk/psLib/src/math/psRandom.c

    r3264 r4083  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-02-17 19:26:23 $
     12*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-01 23:51:25 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969        if(seed == 0) {
    7070            gsl_rng_set(myRNG->gsl,p_psRandomGetSystemSeed());
     71        } else {
     72            gsl_rng_set(myRNG->gsl,seed);
    7173        }
     74        myRNG->type = type;
    7275        break;
    7376
     
    7881        break;
    7982    }
     83
    8084    return(myRNG);
    8185}
Note: See TracChangeset for help on using the changeset viewer.