COM.hugin.HAPI
Class UtilityNode

java.lang.Object
  extended byCOM.hugin.HAPI.Node
      extended byCOM.hugin.HAPI.UtilityNode
All Implemented Interfaces:
java.lang.Cloneable

public class UtilityNode
extends Node

A UtilityNode represents a utility function. The utility function can depend on discrete chance and decision Nodes.


Constructor Summary
UtilityNode(NetworkModel belongsTo)
          Constructs a new UtilityNode in a NetworkModel (i.e., a Class or a Domain).
 
Method Summary
 void generateTable()
          Generates the utility table of this UtilityNode from its model.
 NetworkModel.Category getCategory()
          Returns the Category of this UtilityNode.
 double getExpectedUtility()
          Returns the expected utility associated with this UtilityNode.
 NetworkModel.Kind getKind()
          Returns the Kind of this UtilityNode.
 double getMaxUtility()
          Returns the maximum possible utility associated with this UtilityNode.
 double getMinUtility()
          Returns the minimum possible utility associated with this UtilityNode.
 double getSampledUtility()
          Returns the sampled utility associated with this UtilityNode.
 double getVarianceOfUtility()
          Returns the variance of the utility associated with this UtilityNode.
 
Methods inherited from class COM.hugin.HAPI.Node
addParent, addToInputs, addToOutputs, clone, createTemporalClone, delete, evidenceIsEntered, evidenceIsPropagated, evidenceToPropagate, getAttribute, getAttributes, getChildren, getEdgeConstraint, getHome, getHomeClass, getHomeDomain, getInstance, getJunctionTree, getLabel, getMaster, getModel, getName, getParents, getPosition, getSource, getTable, getTemporalClone, getTemporalMaster, getUserData, isAlive, 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 belongsTo)
            throws ExceptionHugin
Constructs a new UtilityNode in a NetworkModel (i.e., a Class or a Domain).

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

getCategory

public NetworkModel.Category getCategory()
Returns the Category of this UtilityNode.

Specified by:
getCategory in class Node
Returns:
NetworkModel.H_CATEGORY_UTILITY.

getKind

public NetworkModel.Kind getKind()
Returns the Kind of this UtilityNode.

Specified by:
getKind in class Node
Returns:
NetworkModel.H_KIND_OTHER.

generateTable

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

Throws:
ExceptionHugin

getExpectedUtility

public double getExpectedUtility()
                          throws ExceptionHugin
Returns the expected utility associated with this UtilityNode. This is the utility value computed by the most recent inference operation.

Throws:
ExceptionHugin

getSampledUtility

public double getSampledUtility()
                         throws ExceptionHugin
Returns the sampled utility associated with this UtilityNode. This is the utility value determined by the most recent call to Domain.simulate().

Throws:
ExceptionHugin

getVarianceOfUtility

public double getVarianceOfUtility()
                            throws ExceptionHugin
Returns the variance of the utility associated with this UtilityNode. This is the variance of the utility value computed by the most recent inference operation.

Throws:
ExceptionHugin

getMinUtility

public double getMinUtility()
                     throws ExceptionHugin
Returns the minimum possible utility associated with this UtilityNode. This is the smallest utility value for this node with a positive probability as computed by the most recent inference operation.

Throws:
ExceptionHugin

getMaxUtility

public double getMaxUtility()
                     throws ExceptionHugin
Returns the maximum possible utility associated with this UtilityNode. This is the largest utility value for this node with a positive probability as computed by the most recent inference operation.

Throws:
ExceptionHugin