IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 9, 2015, 3:42:26 PM (11 years ago)
Author:
eugene
Message:

move multple copies of gaussian deviates to libohana

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c

    r34088 r39242  
    1717  ResetVector (vec, OPIHI_FLT, Npts);
    1818
    19   gauss_init (2048);
     19  gaussdev_init ();
    2020  for (i = 0; i < Npts; i++) {
    21     vec[0].elements.Flt[i] = rnd_gauss (mean, sigma);
     21    vec[0].elements.Flt[i] = gaussdev_rnd (mean, sigma);
    2222  }
    2323  return (TRUE);
     
    2828   
    2929}
    30 
    31 double int_gauss (int i);
    3230
    3331int gaussintegral (int argc, char **argv) {
     
    4644  ResetVector (vec, OPIHI_FLT, Npts);
    4745
    48   gauss_init (Npts);
     46  gaussdev_init ();
    4947  for (i = 0; i < Npts; i++) {
    50     vec[0].elements.Flt[i] = int_gauss (i);
     48    vec[0].elements.Flt[i] = gaussian_int (i);
    5149  }
    5250  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.