1 #include <../../nrnconf.h>
17 #include <nrnran123.h>
39 #define dmaxuint 4294967295.
61 , px_{std::
move(px)} {
86 unsigned long seed = 0;
92 size = int(
chkarg(2, 7, 98));
119 return (
double) mcr->
orig_;
157 }
catch (
const std::bad_alloc& e) {
158 hoc_execerror(
"Bad allocation for 'NrnRandom123'", e.what());
168 uint32_t gix = (uint32_t)
chkarg(1, 0., 4294967295.);
180 double s =
chkarg(1, 0., 17179869183.);
181 seq = (uint32_t) (
s / 4.);
182 which = char(
s - seq * 4.);
187 return double(seq) * 4. + double(which);
194 return (
double) mcr->
ihigh_;
218 return (*(x->
rand))();
223 return (*(r->
rand))();
252 return (*(x->
rand))();
261 long a1 = long(*
getarg(1));
262 long a2 = long(*
getarg(2));
265 return (*(x->
rand))();
279 return (*(x->
rand))();
293 return (*(x->
rand))();
306 return (*(x->
rand))();
318 int a1 = int(
chkarg(1, 0, 1e99));
319 double a2 =
chkarg(2, 0, 1);
322 return (*(x->
rand))();
335 double a1 =
chkarg(1, 0, 1);
338 return (*(x->
rand))();
352 return (*(x->
rand))();
365 return (*(x->
rand))();
379 return (*(x->
rand))();
393 return (*(x->
rand))();
RandomPlay(Rand *, neuron::container::data_handle< double > px)
neuron::container::data_handle< double > px_
virtual void update(Observable *)
virtual void unref_deferred() const
void class2oc(const char *, ctor_f *cons, dtor_f *destruct, Member_func *, Member_ret_obj_func *, Member_ret_str_func *)
double chkarg(int, double low, double high)
void nrnran123_getids3(nrnran123_State *s, std::uint32_t *id1, std::uint32_t *id2, std::uint32_t *id3)
void nrnran123_setseq(nrnran123_State *s, std::uint32_t seq, char which)
Set a Random123 sequence for a sequnece ID and which selector.
void nrnran123_getseq(nrnran123_State *s, std::uint32_t *seq, char *which)
Get sequence number and selector from an nrnran123_State object.
void check_obj_type(Object *obj, const char *type_name)
Object ** hoc_objgetarg(int)
void nrn_notify_when_void_freed(void *p, Observer *ob)
void nrn_notify_pointer_disconnect(Observer *ob)
static double r_negexp(void *r)
void nrn_random_reset(Rand *r)
int nrn_random123_setseq(Rand *r, uint32_t seq, char which)
static void * r_cons(Object *obj)
static double r_poisson(void *r)
static double r_sequence(void *r)
static double r_repick(void *r)
static double r_uniform(void *r)
static void r_destruct(void *r)
double nrn_random_pick(Rand *r)
static double r_ran123_globalindex(void *r)
static double r_discunif(void *r)
static double r_MCellRan4(void *r)
static Member_func r_members[]
int nrn_random123_getseq(Rand *r, uint32_t *seq, char *which)
static double r_normal(void *r)
static double r_hypergeo(void *r)
int nrn_random_isran123(Rand *r, uint32_t *id1, uint32_t *id2, uint32_t *id3)
static double r_weibull(void *r)
static RandomPlayList * random_play_list_
static double r_lognormal(void *r)
void nrn_set_random_sequence(Rand *r, long seq)
static double r_play(void *r)
static double r_erlang(void *r)
std::vector< RandomPlay * > RandomPlayList
static double r_nrnran123(void *r)
long nrn_get_random_sequence(Rand *r)
Rand * nrn_random_arg(int i)
static double r_binomial(void *r)
static double r_geometric(void *r)
void move(Item *q1, Item *q2, Item *q3)
void nrnran123_set_globalindex(uint32_t gix)
void hoc_execerror(const char *s1, const char *s2)
uint32_t nrnran123_get_globalindex()
void notify_when_handle_dies(data_handle< double > dh, Observer *obs)
Register that obs should be notified when dh dies.
int find(const int, const int, const int, const int, const int)