HAPI::Model Class Reference

A Model is a compact description of a table. More...

List of all members.

Public Member Functions

ExpressiongetExpression (size_t index) const
 Return the Expression associated with a pecific configuration of the Nodes in the Model.
NodeList getNodes () const
 Return a NodeList containing the Nodes in Model.
size_t getNumberOfSamplesPerInterval () const
 Returns the number of values per interval used when generating the conditional probability table for a node with interval parents.
 Model (FunctionNode *belongsToNode, const NodeList &modelNodes)
 Construct a model for a function node given a set of nodes.
 Model (UtilityNode *belongsToNode, const NodeList &modelNodes)
 Construct a model for a utility node given a set of nodes.
 Model (DiscreteNode *belongsToNode, const NodeList &modelNodes)
 Construct a model for a discrete node given a set of nodes.
void setExpression (size_t index, Expression *e)
 Associate an Expression with a specific configuration of the Model Nodes.
void setNumberOfSamplesPerInterval (size_t 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.
size_t size () const
 Return the number of configuration of the Nodes of Model.
 ~Model () throw ()
 Delete the Model.

Detailed Description

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.

See also:
Expression
Node
NodeList

Constructor & Destructor Documentation

HAPI::Model::Model ( UtilityNode belongsToNode,
const NodeList modelNodes 
)

Construct a model for a utility node given a set of nodes.

HAPI::Model::Model ( FunctionNode belongsToNode,
const NodeList modelNodes 
)

Construct a model for a function node given a set of nodes.


Member Function Documentation

size_t HAPI::Model::getNumberOfSamplesPerInterval (  )  const

Returns the number of values per interval used when generating the conditional probability table for a node with interval parents.

Returns:
size_t specifying the number of samples per interval
void HAPI::Model::setNumberOfSamplesPerInterval ( size_t  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.

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

Copyright Hugin Expert A/S 1993-2010