/usr/include/JAGS/graph/LinkNode.h is in jags 4.3.0-1.
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 43 44 45 46 47 48 49 50 | #ifndef LINK__NODE_H_
#define LINK__NODE_H_
#include <graph/LogicalNode.h>
#include <vector>
namespace jags {
class LinkFunction;
/**
* @short Scalar Node representing link function from a GLM
*/
class LinkNode : public LogicalNode {
LinkFunction const * const _func;
public:
/**
* A link node is defined by an inverse link function and a single
* parent node, which must be scalar
*/
LinkNode(LinkFunction const *func, unsigned int nchain,
std::vector<Node const *> const &parents);
/**
* Calculates the value of the node based on the parameters.
*/
void deterministicSample(unsigned int chain);
/**
* Returns true. An inverse link function should accept every
* value in the range [-Inf, Inf].
*/
bool checkParentValues(unsigned int chain) const;
/**
* Returns the linear predictor
*/
double eta(unsigned int chain) const;
/**
* Returns the gradient of the inverse link function
* @see LinkFunction#grad
*/
double grad(unsigned int chain) const;
/**
* Returns the name of the link function
*/
std::string const &linkName() const;
//DeterministicNode *clone(std::vector<Node const *> const &parents) const;
};
} /* namespace jags */
#endif /* LINK_NODE_H_ */
|