Labelled discrete decision node. More...
Public Member Functions | |
LabelledDDNode * | clone () const |
Clone this LabelledDDNode object. | |
LabelledDDNode * | createTemporalClone () |
Construct a temporal clone of this LabelledDDNode object. | |
LabelledDDNode (DiscreteNode *node) | |
Construct a new LabelledDDNode object corresponding to the given DiscreteNode object node . | |
LabelledDDNode (NetworkModel *nm) | |
Create a new LabelledDDNode in the given NetworkModel. | |
void | reorderStates (const std::vector< std::string > &order) |
Reorder the list of states of this node. |
Labelled discrete decision node.
This is the kind of DiscreteDecisionNode most often used.
HAPI::LabelledDDNode::LabelledDDNode | ( | DiscreteNode * | node ) |
Construct a new LabelledDDNode 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.
LabelledDDNode* HAPI::LabelledDDNode::clone | ( | ) | const [virtual] |
Clone this LabelledDDNode object.
Implements HAPI::Node.
LabelledDDNode* HAPI::LabelledDDNode::createTemporalClone | ( | ) | [virtual] |
Construct a temporal clone of this LabelledDDNode object.
Implements HAPI::Node.
void HAPI::LabelledDDNode::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. |