Public Member Functions

HAPI::LabelledDDNode Class Reference

Labelled discrete decision node. More...

Inheritance diagram for HAPI::LabelledDDNode:
HAPI::DiscreteDecisionNode HAPI::DiscreteNode HAPI::Node

List of all members.

Public Member Functions

LabelledDDNodeclone () const
 Clone this LabelledDDNode object.
LabelledDDNodecreateTemporalClone ()
 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.

Detailed Description

Labelled discrete decision node.

This is the kind of DiscreteDecisionNode most often used.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
orderthe new order (which must be a permutation of the current order) of the state labels of this node.

Copyright Hugin Expert A/S 1993-2024