Public Member Functions

HAPI::LabelledDFNode Class Reference

Labelled discrete function node. More...

Inheritance diagram for HAPI::LabelledDFNode:
HAPI::DiscreteFunctionNode HAPI::DiscreteNode HAPI::Node

List of all members.

Public Member Functions

LabelledDFNodeclone () const
 Clone this LabelledDFNode object.
LabelledDFNodecreateTemporalClone ()
 Construct a temporal clone of this LabelledDFNode object.
 LabelledDFNode (DiscreteFunctionNode *node)
 Construct a new LabelledDFNode object corresponding to the given DiscreteFunctionNode object node.
 LabelledDFNode (NetworkModel *nm)
 Create a new LabelledDFNode in the given NetworkModel.
void reorderStates (const std::vector< std::string > &order)
 Reorder the list of states of this node.

Detailed Description

Labelled discrete function node.


Constructor & Destructor Documentation

HAPI::LabelledDFNode::LabelledDFNode ( DiscreteFunctionNode node )

Construct a new LabelledDFNode object corresponding to the given DiscreteFunctionNode object 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

LabelledDFNode* HAPI::LabelledDFNode::clone (  ) const [virtual]

Clone this LabelledDFNode object.

Implements HAPI::Node.

LabelledDFNode* HAPI::LabelledDFNode::createTemporalClone (  ) [virtual]

Construct a temporal clone of this LabelledDFNode object.

Implements HAPI::Node.

void HAPI::LabelledDFNode::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