COM.hugin.HAPI
Class FunctionNode

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

public class FunctionNode
extends Node

A FunctionNode represents a real-valued function. This function is specified using expressions (which may refer to the values of the parents) in a Model.


Constructor Summary
FunctionNode(NetworkModel belongsTo)
          Constructs a new FunctionNode in a NetworkModel (i.e., a Class or a Domain).
 
Method Summary
 NetworkModel.Category getCategory()
          Returns the Category of this FunctionNode.
 NetworkModel.Kind getKind()
          Returns the Kind of this FunctionNode.
 double getSampledValue()
          Returns the sampled value of this FunctionNode.
 double getValue()
          Returns the value of this FunctionNode.
 
Methods inherited from class COM.hugin.HAPI.Node
addParent, addToInputs, addToOutputs, clone, delete, evidenceIsEntered, evidenceIsPropagated, evidenceToPropagate, getAttribute, getAttributes, getChildren, getDomain, getEdgeConstraint, getHome, getHomeClass, getHomeDomain, getInstance, getJunctionTree, getLabel, getMaster, getModel, getName, getParents, getPosition, getSource, getTable, 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

FunctionNode

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

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

getCategory

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

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

getKind

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

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

getValue

public double getValue()
                throws ExceptionHugin
Returns the value of this FunctionNode. The value is computed using the function associated with the node. If the function refers to other nodes, then the values of those nodes are derived from the results of the most recent inference operation.

Throws:
ExceptionHugin

getSampledValue

public double getSampledValue()
                       throws ExceptionHugin
Returns the sampled value of this FunctionNode. The value is computed using the function associated with the node. If the function refers to other nodes, then the values of those nodes are derived from the results of the most recent call to Domain.simulate().

Throws:
ExceptionHugin