Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

HAPI::UtilityNode Class Reference

Inheritance diagram for HAPI::UtilityNode:

HAPI::Node List of all members.

Detailed Description

A UtilityNode represents a utility function.

The utility function can depend on discrete chance and decision Nodes.

UtilityNodes are used in influence diagrams to represent utilities associated with decision options.


Public Member Functions

 UtilityNode (Domain *dom)
 Create a new UtilityNode in the given Domain.

 UtilityNode (Class *cls)
 Create a new UtilityNode in the given Class.

Category getCategory () const
 Return the node category.

Kind getKind () const
 Return the node kind.

void addParent (DiscreteChanceNode *parent)
 Add parent as a new parent of this node.

void removeParent (DiscreteChanceNode *parent)
 Remove the directed link between parent and this node.

void switchParent (DiscreteChanceNode *oldParent, DiscreteChanceNode *newParent)
 Substitute a new parent for an old parent.

void addParent (DiscreteDecisionNode *parent)
 Add parent as a new parent of this node.

void removeParent (DiscreteDecisionNode *parent)
 Remove the directed link between parent and this node.

void switchParent (DiscreteDecisionNode *oldParent, DiscreteDecisionNode *newParent)
 Substitute a new parent for an old parent.

NodeList getParents () const
 Return a NodeList with references to the parents of this node.

TablegetTable ()
 Return the table associated with this node.

void touchTable ()
 Touch the table of this node.


Member Function Documentation

void HAPI::UtilityNode::addParent DiscreteDecisionNode parent  ) 
 

Add parent as a new parent of this node.

That is, add a directed link from parent to this node.

Parameters:
parent DiscreteDecisionNode*

void HAPI::UtilityNode::addParent DiscreteChanceNode parent  ) 
 

Add parent as a new parent of this node.

That is, add a directed link from parent to this node.

Parameters:
parent DiscreteChanceNode*

Category HAPI::UtilityNode::getCategory  )  const [inline, virtual]
 

Return the node category.

Returns:
Category

Implements HAPI::Node.

NodeList HAPI::UtilityNode::getParents  )  const
 

Return a NodeList with references to the parents of this node.

If no parents exist, an empty NodeList is returned.

Returns:
NodeList

Table* HAPI::UtilityNode::getTable  ) 
 

Return the table associated with this node.

The table contains a utility value for every configuration of the parents of this node. The set of nodes associated with the table will be the (discrete) parents of this node in unspecified order.

Returns:
Pointer to Table containing utility values.

void HAPI::UtilityNode::removeParent DiscreteDecisionNode parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the updated table will be the portion of the old table that corresponds to parent being in its first state.

Parameters:
parent pointer to the DiscreteDecisionNode that will be removed as parent.

void HAPI::UtilityNode::removeParent DiscreteChanceNode parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the updated table will be the portion of the old table that corresponds to parent being in its first state.

Parameters:
parent pointer to the DiscreteChanceNode that will be removed as parent.

void HAPI::UtilityNode::switchParent DiscreteDecisionNode oldParent,
DiscreteDecisionNode newParent
 

Substitute a new parent for an old parent.

The new parent must be compatible with the old parent: This implies that it must be of the same class, have the same number of states, etc.

void HAPI::UtilityNode::switchParent DiscreteChanceNode oldParent,
DiscreteChanceNode newParent
 

Substitute a new parent for an old parent.

The new parent must be compatible with the old parent: This implies that it must be of the same class, have the same number of states, etc.

void HAPI::UtilityNode::touchTable  ) 
 

Touch the table of this node.

This should be done to notify the inference engine whenever changes made to the Table should be used in subsequent inference. Changes made by the Hugin API will automatically provide this notification.


Copyright Hugin Expert A/S 1993-2004