32#define MAX_REDRAWS 1000
65 obj->params = *params_sdram;
66 *
region = ¶ms_sdram[1];
68 log_debug(
"normal clipped mu = %k, sigma = %k, low = %k, high = %k",
69 obj->params.mu, obj->params.sigma, obj->params.low,
95 value = obj->params.mu + (value * obj->params.sigma);
97 }
while ((value < obj->
params.low || value > obj->params.high)
100 log_error(
"Maximum number of redraws (%u) exceeded on clipped normal "
101 "distribution with mu=%k, sigma=%k, low=%k, high=%k",
102 n_draws, obj->params.mu, obj->params.sigma, obj->params.low,
void log_error(const char *message,...)
void log_debug(const char *message,...)
General types associated with generators.
rng_t * core_rng
An RNG that is local to the current core.
static accum param_generator_normal_clipped_generate(void *generator)
How to generate values with the clipped normal RNG parameter generator.
#define MAX_REDRAWS
The maximum number of redraws performed before giving up.
static void param_generator_normal_clipped_free(void *generator)
How to free any data for the clipped normal RNG parameter generator.
static void * param_generator_normal_clipped_initialize(void **region)
How to initialise the clipped normal RNG parameter generator.
The parameters that can be copied in from SDRAM.
The data structure to be passed around for this generator. This includes the parameters and an RNG.
accum rng_normal(rng_t *rng)
Generate an normally-distributed random number.
Random number generator interface.
void sark_free(void *ptr)
void rt_error(uint code,...)
region
spike source array region IDs in human readable form
static stdp_params params
Configuration parameters.