A Model is a compact description of a table. More...
Public Member Functions | |
Expression * | getExpression (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. |
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.
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.
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.
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.
count | The number of subintervals |