Application Programmers Manual: Network Structure
From DSL
A network is composed of nodes and arcs. Each node in a network is represented by a handle that can be used to retrieve any information you need about the node. For each node, the network maintains a list with the handles of its parents and its children. Use GetParents() and GetChildren() methods to get the parents/children of a particular node.
You cannot create a node in the void. Instead, you should ask the network to create it for you. This can be done by using the AddNode() method. Arcs can be added with the AddArc() method and removed with the RemoveArc() one. When you add or remove and arc, the definition of the nodes involved will resize accordingly to fit the new interaction of the node with its parents. For example, a node of DSL_CPT type with two states and no parents has a conditional probability table of size 2. If we now add an arc from a parent with three states to that node, its table will automatically grow into a 3x2 conditional probability table. If we remove the arc, the table will shrink back to its original size.
The network is your basic structure. You declare one instance of this class (or new it), add the necessary nodes and arcs (or load the model from a file), enter evidence, make inference and view the results. Almost everything is done through the network. Remember that it is not a good idea to store pointers to the nodes. This pointers may become invalid as new nodes are added or removed from the network. Only handles are guaranteed to remain constant. To access one particular node, the GetNode() method is provided. The only parameter of that function is the handle of the node you are interested in.
