#ifndef LOGICAL_NODE_H_ #define LOGICAL_NODE_H_ #include #include class Function; class SArray; /** * The value of a logical node is a function of its parents. * * @short Logical Node */ class LogicalNode : public DeterministicNode { Function const * const _func; std::vector _parameters; /* Forbid copying of logical nodes */ LogicalNode(LogicalNode const &orig); LogicalNode &operator=(LogicalNode const &rhs); public: LogicalNode(Function const *func, std::vector const ¶meters); ~LogicalNode(); /** Returns the parameters of the node as a vector of SArray pointers */ std::vector const ¶meters() const; /** Returns the Function of the logical node */ Function const* function() const; /** * Calculates the value of the node based on the parameters. This * function calls Function::checkParameterValue and will throw an * exception if the result is false. */ void forwardSample(); std::string name(NodeNameTab const &name_table) const; }; bool isLogical(Node const *node); LogicalNode *asLogical(Node *node); #endif /* LOGICAL_NODE_H_ */