9 #define SET_CODE(CODE) virtual std::string getCode() const override{ return CODE; } 23 virtual std::string
getCode()
const{
return ""; }
70 "const scalar scale = $(max) - $(min);\n" 71 "$(value) = $(min) + ($(gennrand_uniform) * scale);");
89 SET_CODE(
"$(value) = $(mean) + ($(gennrand_normal) * $(sd));");
106 SET_CODE(
"$(value) = $(lambda) * $(gennrand_exponential);");
123 SET_CODE(
"$(value) = $(b) * $(gennrand_gamma, $(a));");
Initialises variable by sampling from the exponential distribution.
Definition: initVarSnippet.h:101
Initialises variable by sampling from the exponential distribution.
Definition: initVarSnippet.h:118
Initialises variable to a constant value.
Definition: initVarSnippet.h:46
Initialises variable by sampling from the normal distribution.
Definition: initVarSnippet.h:84
Used to mark variables as uninitialised - no initialisation code will be run.
Definition: initVarSnippet.h:30
#define DECLARE_SNIPPET(TYPE, NUM_PARAMS)
Definition: snippet.h:11
Definition: initVarSnippet.h:17
Base class for all value initialisation snippets.
Definition: initVarSnippet.h:15
Base class for all code snippets.
Definition: snippet.h:105
#define SET_PARAM_NAMES(...)
Definition: snippet.h:28
#define SET_CODE(CODE)
Definition: initVarSnippet.h:9
virtual std::string getCode() const
Definition: initVarSnippet.h:23