COM.hugin.HAPI
Class Model

java.lang.Object
  extended byCOM.hugin.HAPI.Model

public class Model
extends java.lang.Object

A Model is a compact description of a table. A model consists of a list of discrete nodes and a set of expressions (one expresion per configuration of states in the nodes.


Constructor Summary
Model(Node initBelongsTo, NodeList modelNodes)
          Constructs a model over a node given a set of Nodes.
 
Method Summary
 void delete()
          Deletes this Model.
 Expression getExpression(int index)
          Returns the Expression associated with a pecific configuration of the Nodes of this Model.
 NodeList getNodes()
          Returns a NodeList containing the Nodes in this Model.
 int getNumberOfSamplesPerInterval()
          Returns the number of values per interval used when generating the conditional probability table for a node with interval parents.
 int getSize()
          Returns the number of configuration of the Nodes of this Model.
 void setExpression(int index, Expression expression)
          Associates an Expression with a specific configuration of the Nodes of this Model.
 void setNumberOfSamplesPerInterval(int count)
          Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model

public Model(Node initBelongsTo,
             NodeList modelNodes)
      throws ExceptionHugin
Constructs a model over a node given a set of Nodes.

Method Detail

delete

public void delete()
            throws ExceptionObjectNotAlive
Deletes this Model.

Throws:
ExceptionObjectNotAlive

getNodes

public NodeList getNodes()
                  throws ExceptionHugin
Returns a NodeList containing the Nodes in this Model.

Throws:
ExceptionHugin

getSize

public int getSize()
            throws ExceptionObjectNotAlive
Returns the number of configuration of the Nodes of this Model.

Throws:
ExceptionObjectNotAlive

setExpression

public void setExpression(int index,
                          Expression expression)
                   throws ExceptionHugin
Associates an Expression with a specific configuration of the Nodes of this Model.

Throws:
ExceptionHugin

getExpression

public Expression getExpression(int index)
                         throws ExceptionHugin
Returns the Expression associated with a pecific configuration of the Nodes of this Model.

Throws:
ExceptionHugin

setNumberOfSamplesPerInterval

public void setNumberOfSamplesPerInterval(int count)
                                   throws ExceptionHugin
Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents.

When generating the conditional probability table for a node with interval nodes as parents, a number of values are taken within each bounded interval of an interval parent. By default, the interval is divided into 25 subintervals, and the midpoints of these subintervals are then used in the computation of the value of the child.

Parameters:
count - the number of subintervals.
Throws:
ExceptionHugin

getNumberOfSamplesPerInterval

public int getNumberOfSamplesPerInterval()
                                  throws ExceptionHugin
Returns the number of values per interval used when generating the conditional probability table for a node with interval parents.

Returns:
An integer.
Throws:
ExceptionHugin