Simpact Cyan
Population based event driven simulation using mNRM
|
Go to the source code of this file.
Functions | |
ProbabilityDistribution * | getDistributionFromConfig (ConfigSettings &config, GslRandomNumberGenerator *pRndGen, const std::string &prefix) |
This is a helper function to more easily specify a particular 1D probability distribution in a config file. More... | |
ProbabilityDistribution* getDistributionFromConfig | ( | ConfigSettings & | config, |
GslRandomNumberGenerator * | pRndGen, | ||
const std::string & | prefix | ||
) |
This is a helper function to more easily specify a particular 1D probability distribution in a config file.
The config
parameter specifies the settings read from a config file, the pRndGen
parameter is the random number generator to base the random numbers on and prefix
specifies the start of the key in the config file.
For example, if the prefix is 'test', this function will first look for a key called 'test.dist.type'. Depending on its value, other keys for the parameters of the probability distribution will be sought. A newly created instance of the probability distribution will be returned on success, the program will abort when there's an error.
An overview of the currently supported distributions and their parameters (values are just examples):
Not really a distribution, but something you can use to set a specific value:
A uniform distribution:
Beta distribution,
Gamma distribution,
Log-normal distribution,
Normal distribution,