Inheritance diagram for HAPI::Node:
All nodes need a Domain* as argument, that is, the domain must exist before nodes can be created into it.
Public Member Functions | |
virtual | ~Node () throw () |
Delete Node. | |
std::string | getAttribute (const std::string &key) const |
Return the value associated with key in the attribute list for this node. | |
virtual Category | getCategory () const=0 |
Return the node category. | |
virtual Kind | getKind () const=0 |
Return the node kind. | |
Domain * | getDomain () const |
Return the Domain this Node belongs to. | |
JunctionTree * | getJunctionTree () const |
Return the JunctionTree to which this node belongs. | |
std::string | getLabel () const |
Get the label of this node. | |
Model * | getModel () const |
Return the Model of this Node. | |
std::string | getName () |
Retrieve the name of this Node. | |
std::pair< long, long > | getPosition () const |
Return the position of the node. | |
void * | getUserData () const |
Return the value stored within the user data slot of this node. | |
Constraint | getEdgeConstraint (Node *bNode) const |
Retrieve the learning constraint specified for the edge. | |
void | setEdgeConstraint (Node *bNode, Constraint C) |
Specify constraint for the edge. | |
void | generateTable () |
Generate the conditional probability table for this node, as it is specified by the model (i.e., the expressions). | |
AttributeList | getAttributes () const |
Returns a vector of attributes associated with this Node. | |
void | setAttribute (const std::string &key, const std::string &value) |
Insert the key/value pair in the attribute list for this node. | |
void | setLabel (const char *label) |
Set the node label. | |
void | setLabel (const std::string &label) |
Set the node label. | |
void | setName (const char *name) |
Create a copy of name and assign it to this node. | |
void | setName (const std::string &name) |
Create a copy of name and assign it to this node. | |
void | setPosition (long x, long y) |
Set the position of the node. | |
void | setPosition (const std::pair< long, long > &pos) |
Set the position of the node. | |
void | setUserData (void *data) |
The Hugin API provides a data slot within each Node object. | |
Domain * | getHomeDomain () const |
Get the Domain in which this node is placed. | |
Class * | getHomeClass () const |
Get the class in which this node is placed. | |
void | addToInputs () |
Add this Node to the list of input nodes in this Class. | |
void | addToOutputs () |
Add this Node to the list of output nodes in this Class. | |
void | removeFromInputs () |
Remove this Node from the list of input nodes in the Class. | |
void | removeFromOutputs () |
Remove this Node from the list of output nodes in the Class. | |
Node * | getInstance () const |
Returns the InstanceNode containing this (cloned) output node. | |
Node * | getMaster () const |
Returns the "master" of this (cloned) output Node of an InstanceNode (i.e., the Node cloned to get this output Node). | |
NodeList | getSource () const |
Returns a NodeList of Class nodes that identifies this Domain node. |
|
Delete Node. The node is deleted from its domain. If the domain was compiled, the corresponding compiled structure is deleted. All references and pointers to the node become invalid. |
|
Add this Node to the list of input nodes in this Class. I.e., make this Node an input node. |
|
Add this Node to the list of output nodes in this Class. I.e., make this Node an output node. |
|
Generate the conditional probability table for this node, as it is specified by the model (i.e., the expressions). If one or more expressions are illegal in one way or the other, an expression is thrown. |
|
Return the value associated with key in the attribute list for this node.
|
|
Return the node category.
Implemented in HAPI::DiscreteChanceNode, HAPI::ContinuousChanceNode, HAPI::DiscreteDecisionNode, HAPI::UtilityNode, and HAPI::InstanceNode. |
|
Return the Domain this Node belongs to. This Node must reside in an existing Hugin domain. |
|
Get the Domain in which this node is placed. This function is equivalent to getDomain, and is only here for consistency with getHomeClass. |
|
Returns the InstanceNode containing this (cloned) output node. Note that we clone all output nodes when we create an InstanceNode. This is done in order to make it possible to specify conditional probability tables involving output nodes from InstanceNode's.
|
|
Return the JunctionTree to which this node belongs.
|
|
Return the node kind.
Implemented in HAPI::DiscreteChanceNode, HAPI::ContinuousChanceNode, HAPI::DiscreteDecisionNode, HAPI::UtilityNode, and HAPI::InstanceNode. |
|
Get the label of this node.
|
|
Returns the "master" of this (cloned) output Node of an InstanceNode (i.e., the Node cloned to get this output Node). Note that "master" belongs to another Class object. Note also that we clone all output nodes when we create an InstanceNode. This is done in order to make it possible to specify conditional probability tables involving output nodes from InstanceNode's.
|
|
Return the Model of this Node.
|
|
Retrieve the name of this Node. If this node has not previously been assigned a name, a valid name will automatically be assigned.
|
|
Return the position of the node.
|
|
Returns a NodeList of Class nodes that identifies this Domain node. The createDomain method of the Class class unfolds an object-oriented (nested) specification of a Bayesian network or an influence diagram into a regular Domain object. Nodes in this Domain which originates from nodes residing in nested sub-networks (via InstanceNodes) can be uniquely related to a sequence of InstanceNodes and an ordinary Node of the object-oriented network.
|
|
Return the value stored within the user data slot of this node. If the stored value is NULL, or if no value has been stored, NULL is returned. It is the responsibility of the application programmer to ensure that the data is valid, that pointers are accessed correctly, etc. Also note that when you delete a node, Hugin does not attempt to delete the data pointed to by the user data slot. It is the responsibility of the user.
|
|
Remove this Node from the list of input nodes in the Class. I.e., make this Node an ordinary node again. |
|
Remove this Node from the list of output nodes in the Class. I.e., make this Node an ordinary node again. |
|
Insert the key/value pair in the attribute list for this node. If key is already defined, the value is updated. If no value is provided, the attribute is removed.
|
|
Set the node label.
|
|
Set the node label.
|
|
Create a copy of name and assign it to this node.
name must be a valid name, i.e., it must follow the rules that govern the validity of C identifiers, and no other node in the domain to which
|
|
Create a copy of name and assign it to this node.
name must be a valid name, i.e., it must follow the rules that govern the validity of C identifiers, and no other node in the domain to which
|
|
Set the position of the node.
|
|
Set the position of the node.
|
|
The Hugin API provides a data slot within each Node object. This data slot is for use exclusively by the user/application. This slot can hold a pointer to arbitrary data, such as a file, a display window, an input buffer from hardware sensors, etc. Please note that Hugin does not do anything to the user data. Data is not even copied. Only the pointer to the data is stored.
|