/usr/include/JAGS/rng/TruncatedNormal.h is in jags 4.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #ifndef TRUNCATED_NORMAL_H_
#define TRUNCATED_NORMAL_H_
namespace jags {
struct RNG;
/**
* Draws a random sample from a left-truncated normal distribution.
*
* @param left Left limit of the truncated distribution
* @param rng Pointer to a Random Number Generator
* @param mu Mean of untruncated distribution
* @param sigma Standard deviation of untruncated distribution
*/
double lnormal(double left, RNG *rng, double mu = 0, double sigma = 1);
/**
* Draws a random sample from a right-truncated normal distribution.
*
* @param right Right limit of the distribution
* @param rng Pointer to a Random Number Generator
* @param mu Mean of untruncated distribution
* @param sigma Standard deviation of untruncated distribution
*/
double rnormal(double right, RNG *rng, double mu = 0, double sigma = 1);
/**
* Draws a random sample from an interval-truncated normal distribution.
*
* @param left Left limit of the distribution
* @param right Right limit of the distribution
* @param rng Pointer to a Random Number Generator
* @param mu Mean of untruncated distribution
* @param sigma Standard deviation of untruncated distribution
*/
double inormal(double left, double right, RNG *rng,
double mu = 0, double sigma = 1);
} /* namespace jags */
#endif /* TRUNCATED_NORMAL_H_ */
|