Public Member Functions

HAPI::NumberedDDNode Class Reference

Numbered discrete decision node. More...

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

List of all members.

Public Member Functions

NumberedDDNodeclone () const
 Clone this NumberedDDNode object.
NumberedDDNodecreateTemporalClone ()
 Construct a temporal clone of this NumberedDDNode object.
double getQuantile (double probability) const
 Return the quantile corresponding to the specified probability argument of the inverse cumulative distribution function.
Index getStateIndex (double value) const
 Return the index of the state matching the specified value.
double getStateValue (size_t state) const
 Return the value associated with state.
 NumberedDDNode (DiscreteNode *node)
 Construct a new NumberedDDNode object corresponding to the given DiscreteNode object node.
 NumberedDDNode (NetworkModel *nm)
 Create a new NumberedDDNode in the given NetworkModel.
void setStateValue (size_t state, double value)
 Set the value associated with state.

Detailed Description

Numbered discrete decision node.

Each state of an NumberedDDNode represents a number.


Constructor & Destructor Documentation

HAPI::NumberedDDNode::NumberedDDNode ( DiscreteNode node )

Construct a new NumberedDDNode 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

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

Clone this NumberedDDNode object.

Implements HAPI::Node.

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

Construct a temporal clone of this NumberedDDNode object.

Implements HAPI::Node.

Index HAPI::NumberedDDNode::getStateIndex ( double  value ) const

Return the index of the state matching the specified value.

If there is no (unique) state with the specified state value, -1 is returned.

Parameters:
valuethe state value of the state to be searched for
Returns:
the index of the state with the specified state value.

Copyright Hugin Expert A/S 1993-2024