Public Member Functions

HAPI::LabelledDCNode Class Reference

Labelled discrete chance node. More...

Inheritance diagram for HAPI::LabelledDCNode:
HAPI::DiscreteChanceNode HAPI::DiscreteNode HAPI::Node

List of all members.

Public Member Functions

LabelledDCNodeclone () const
 Clone this LabelledDCNode object.
LabelledDCNodecreateTemporalClone ()
 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.

Detailed Description

Labelled discrete chance node.

This is the most commonly used node type.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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