Reference Manual: DSL node

From DSL

Jump to: navigation, search

A node is divided basically into two parts: definition and value. Besides that, it contains some "non-important" information like identifier, name, etc. Each identifier must be unique through the whole network.


Methods

  • int ChangeType(int newType)

Changes the type of the node to newType. The transformations undergone by the node are specified in the following table. In every case, arcs coming from parents that are not compatible anymore with the newType of the node will be removed.

(Note: DSL_CPT, DSL_TRUTHTABLE, DSL_NOISY_OR, DSL_NOISY_AND suffer the same transformations on each occasion so only DSL_CPT will be shown in the table).


From: DSL_LIST DSL_CPT DSL_TABLE DSL_MAU
To:
DSL_LIST - A,B,F E,F F,G
DSL_CPT A,C,F - E,C G,C
DSL_TABLE D,F D,B,F - G
DSL_MAU D,F D,B E -


Transformations:

A - Number and name of outcomes are preserved

B - Uniform distribution is assigned to the node

C - Conditional probabilities are lost

D - Minimum number of outcomes created

E - Default expected utilities (zero) are assigned to the node

F - Arcs from parents are removed

G - Default weights (one) are assigned to each parent

H - Utilities are transformed into likelihood within the interval [0,1]


  • DSL_nodeDefinition *Definition(void)

Returns a pointer to the definition of the node. See DSL_nodeDefinition to find the definition type that corresponds to each type of node.


  • int Handle(void)

Returns the handle of the node in the network. This handle is an integer that uniquely identifies each node. These handles are guaranteed to be permanent whereas the memory addresses of the nodes may change. Thus, it is not recommended to store pointers to nodes. Store handles instead.


  • DSL_nodeInfo &Info(void)

Returns some useful information about the node, like node identifier, node name and node comment.


  • DSL_network *Network(void)

Returns a pointer to the network we are included in.


  • DSL_nodeValue *Value(void)

Returns a pointer to the value of the node. See DSL_nodeValue to find the value type that corresponds to each type of node.

Personal tools