COM.hugin.HAPI
Class UtilityNode

java.lang.Object
  extended byCOM.hugin.HAPI.Node
      extended byCOM.hugin.HAPI.UtilityNode

public class UtilityNode
extends Node

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.


Constructor Summary
UtilityNode(NetworkModel initBelongsTo)
          Constructs a new UtilityNode in a NetworkModel (i.e., a Class or a Domain).
 
Method Summary
 void delete()
          Deletes this UtilityNode.
 void generateTable()
          Generates the utility table of this UtilityNode from its model.
 NetworkModel.Category getCategory()
          Returns the Category for this UtilityNode.
 NetworkModel.Kind getKind()
          Returns the Kind for this UtilityNode.
 Table getTable()
          Returns the Table associated with this UtilityNode.
 void touchTable()
          Touches the Table of this UtilityNode.
 
Methods inherited from class COM.hugin.HAPI.Node
addParent, addToInputs, addToOutputs, evidenceIsEntered, evidenceIsPropagated, evidenceToPropagate, getAttribute, getAttributes, getChildren, getDomain, getEdgeConstraint, getHome, getHomeClass, getHomeDomain, getInstance, getJunctionTree, getLabel, getMaster, getModel, getName, getParents, getPosition, getSource, getUserData, likelihoodIsEntered, likelihoodIsPropagated, removeFromInputs, removeFromOutputs, removeParent, reverseEdge, setAttribute, setAttributes, setEdgeConstraint, setLabel, setName, setPosition, setUserData, switchParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtilityNode

public UtilityNode(NetworkModel initBelongsTo)
            throws ExceptionHugin
Constructs a new UtilityNode in a NetworkModel (i.e., a Class or a Domain).

Parameters:
initBelongsTo - the NetworkModel in which the new UtilityNode should be created.
Method Detail

getTable

public Table getTable()
               throws ExceptionHugin
Returns the Table associated with this UtilityNode. The Table contains a utility value for each configuration of the parents of the UtilityNode. The set of Nodes associated with the table will be the (discrete) parents of the UtilityNode in unspecified order.

Returns:
A Table containing utility values for this UtilityNode.
Throws:
ExceptionHugin

getCategory

public NetworkModel.Category getCategory()
                                  throws ExceptionObjectNotAlive
Returns the Category for this UtilityNode.

Overrides:
getCategory in class Node
Returns:
NetworkModel.H_CATEGORY_UTILITY.
Throws:
ExceptionObjectNotAlive

getKind

public NetworkModel.Kind getKind()
                          throws ExceptionObjectNotAlive
Returns the Kind for this UtilityNode.

Overrides:
getKind in class Node
Returns:
NetworkModel.H_KIND_DISCRETE.
Throws:
ExceptionObjectNotAlive

generateTable

public void generateTable()
                   throws ExceptionHugin
Generates the utility table of this UtilityNode from its model.

Throws:
ExceptionHugin

touchTable

public void touchTable()
                throws ExceptionHugin
Touches the Table of this UtilityNode. 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.

Throws:
ExceptionHugin

delete

public void delete()
            throws ExceptionHugin
Deletes this UtilityNode.

Overrides:
delete in class Node
Throws:
ExceptionHugin