Ignore:
Timestamp:
Oct 10, 2006, 2:28:40 AM (15 years ago)
Author:
Peter
Message:

fixes #152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/c++_tools/random/random.cc

    r562 r674  
    5353
    5454
    55 
     55 
    5656  u_long RNG::seed_from_devurandom(void)
    5757  {
     
    6868    seed(s);
    6969    return s;
     70  }
     71
     72
     73
     74  int RNG::set_state(const RNG_state& state)
     75  {
     76    return gsl_rng_memcpy(rng_, state.rng());
     77  }
     78
     79
     80
     81  RNG_state::RNG_state(const RNG* rng)
     82  {
     83    rng_ = gsl_rng_clone(rng->rng());
     84  }
     85 
     86
     87
     88  RNG_state::~RNG_state(void)
     89  {
     90    gsl_rng_free(rng_);
     91    rng_=NULL;
    7092  }
    7193
Note: See TracChangeset for help on using the changeset viewer.