Public Member Functions

HAPI::IntervalDCNode Class Reference

Interval discrete chance node. Each state represents an interval. More...

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

List of all members.

Public Member Functions

IntervalDCNodeclone () const
 Clone this IntervalDCNode object.
IntervalDCNodecreateTemporalClone ()
 Construct a temporal clone of this IntervalDCNode 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 (interval) matching the specified value.
double getStateValue (size_t state) const
 Return the value associated with the specified state.
 IntervalDCNode (DiscreteNode *node)
 Construct a new IntervalDCNode object corresponding to the given DiscreteNode object node.
 IntervalDCNode (NetworkModel *nm)
 Create a new IntervalDCNode in the given NetworkModel.
void setStateValue (size_t state, double value)
 Associate a value with the specified state.

Detailed Description

Interval discrete chance node. Each state represents an interval.


Constructor & Destructor Documentation

HAPI::IntervalDCNode::IntervalDCNode ( DiscreteNode node )

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

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

Clone this IntervalDCNode object.

Implements HAPI::Node.

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

Construct a temporal clone of this IntervalDCNode object.

Implements HAPI::Node.

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

Return the index of the state (interval) matching the specified value.

If there is no interval containing the specified value, -1 is returned.

Parameters:
valuean interval containing this value will be searched for
Returns:
the index of the state (interval) containing the specified value.
void HAPI::IntervalDCNode::setStateValue ( size_t  state,
double  value 
)

Associate a value with the specified state.

Parameters:
statethe state for which the value is specified
valuethe value to specify

Copyright Hugin Expert A/S 1993-2024