#ifndef CONSTANT_NODE_H_ #define CONSTANT_NODE_H_ #include /** * Constant nodes represent the top level parameters in any directed * graphical model. They are always scalar, and should not have * parents. It is not an error to add parents to a constant node, but * it does not make any sense either. */ class ConstantNode : public Node { public: /** * Construct node and set its value. The value is fixed. */ ConstantNode(double value); /** * This function does nothing. It exists only so that objects of * class ConstantNode can be instantiated. */ void forwardSample(); std::string name(NodeNameTab const &name_table) const; /** * Constant nodes are considered stochastic. They are observed * random variables whose values we are conditioning on. */ bool isStochastic() const; }; #endif /* CONSTANT_NODE_H_ */