22 class urand:
public random_gen
25 friend class gaussrand;
27 void operator=(
const urand&);
33 void seed(
int s) {unur_urng_seed(gen,s);}
34 void Seed(
int s) {seed(s);}
35 double rand() {
return unur_urng_sample(gen);};
37 void Set_gen(
const char* descr) {set_gen(descr);}
40 void set_gen(
const char* descr);
52 void set_gen(
TCL_args args) {Set_gen(args);}
53 UNUR_GEN *get_gen() {
return gen;}
54 void Set_gen(
const char *descr)
56 if (gen) unur_free(gen);
57 gen=unur_str2gen(descr);
58 if (gen==NULL)
throw error(
"Cannot create generator %s",descr);
59 unur_chg_urng(gen,uni.gen);
62 unuran(
const char* descr): gen(NULL) {Set_gen(descr);}
63 ~
unuran() {
if (gen) unur_free(gen);}
77 #pragma omit pack ecolab::urand 78 #pragma omit unpack ecolab::urand 79 #pragma omit pack ecolab::unuran 80 #pragma omit unpack ecolab::unuran EcoLab exception class.
Definition: error.h:25
abstract base class for representing random number generators
Definition: random.h:32
Gaussian (normal) random generator.
Definition: random_basic.h:19
class to allow access to private members
Definition: classdesc_access.h:21
class to allow access to private members
Definition: classdesc_access.h:22
#define CLASSDESC_ACCESS(type)
add friend statements for each accessor function
Definition: classdesc_access.h:36
Represent arguments to TCL commands.
Definition: TCL_obj_base.h:138
universal non-uniform random generator
Definition: random_unuran.h:44
Contains definitions related to classdesc functionality.
Definition: arrays.h:2514
_OPENMP
Definition: accessor.h:16
Contains access_* structs, and nothing else. These structs are used to gain access to private members...
Definition: accessor.h:55
Definition: random_basic.h:11