Labelled discrete chance node. More...
Public Member Functions | |
LabelledDCNode * | clone () const |
Clone this LabelledDCNode object. | |
LabelledDCNode * | createTemporalClone () |
Construct a temporal clone of this LabelledDCNode object. | |
LabelledDCNode (DiscreteNode *node) | |
Construct a new LabelledDCNode object corresponding to the given DiscreteNode object node . | |
LabelledDCNode (NetworkModel *nm) | |
Create a new LabelledDCNode in the given NetworkModel. | |
void | reorderStates (const std::vector< std::string > &order) |
Reorder the list of states of this node. |
Labelled discrete chance node.
This is the most commonly used node type.
HAPI::LabelledDCNode::LabelledDCNode | ( | DiscreteNode * | node ) |
Construct a new LabelledDCNode object corresponding to the given DiscreteNode object node
.
(node
must be a chance or a decision node.) The new object will be identical to node
(that is, same parents, same table, etc.) except for its type.
As a side-effect, the object node
is deleted. And if node
is an output node, then all output clone objects associated with the node are also deleted.
LabelledDCNode* HAPI::LabelledDCNode::clone | ( | ) | const [virtual] |
Clone this LabelledDCNode object.
Implements HAPI::Node.
LabelledDCNode* HAPI::LabelledDCNode::createTemporalClone | ( | ) | [virtual] |
Construct a temporal clone of this LabelledDCNode object.
Implements HAPI::Node.
void HAPI::LabelledDCNode::reorderStates | ( | const std::vector< std::string > & | order ) |
Reorder the list of states of this node.
The order
list must contain the state labels of this node in the desired order.
In addition to reordering the state labels of this node, the contents of all tables and models containing this node, and case data associated with this node, are updated to match the new ordering of the states.
The states of this node must be uniquely labeled.
order | the new order (which must be a permutation of the current order) of the state labels of this node. |