COM.hugin.HAPI
Class FunctionNode

java.lang.Object
  extended by COM.hugin.HAPI.Node
      extended by COM.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 getPredictedValue(long time)
          Returns the predicted value of this FunctionNode at the specified time point.
 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, 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

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.
Throws:
ExceptionHugin
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

getPredictedValue

public double getPredictedValue(long time)
                         throws ExceptionHugin
Returns the predicted value of this FunctionNode at the specified time point. This method accesses the predictions computed by a previous call to computeDBNPredictions.

Parameters:
time - time slice index (a nonnegative integer less than the number of predicted time slices)
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