Manual: Introduction
From DSL
A few important rules regarding graphical models and the approach to them used in wrappers libraries has been collected below. We provide them for the sake of clarification of the further sections of this documentation.
- Each network is composed of nodes and arcs.
- Each node is characterized by handle, id, and name.
- Each node has at least one outcome (state). Some limitations apply to the number of outcomes depending on a type of the node (e.g., a node of type Cpt has to have at least two outcomes).
- Each outcome of a node is characterized by index and id.
- A node's handle is an integer that uniquely identifies it. It is assigned when the node is created and is guaranteed to remain constant for the lifetime of the network (i.e., from the creation of a network object till its destruction; a handle is not saved to a file).
- An outcome's index is an integer that uniquely identifies it. It represents the position of the outcome in the outcomes list. Outcomes' indices start from 0.
- An id is a string that uniquely identifies a node or an outcome. An id has to start with a letter and can contain only letters, digits and underscores.
- All the methods expecting a reference to a node accept both node's handle and id interchangeably. The same applies to an outcome's index and id - both of them can be used whenever a reference to an outcome is required.
- Whenever a reference to a node (handle/id) or an outcome (index/id) is required the method being called will check the validity of the passed values. If an invalid reference is passed (e.g., a node id has been misspelled), an exception will be thrown.
