# New link

Links in a Bayesian network or Dynamic Bayesian network, indicate that the variable(s) in one node, influence the variable(s) in the other.

##### NOTE

The distribution for a node, depends on the incoming links of a node. More specifically,
the distribution for a node `A`

is the conditional probability `P(A|parents(A))`

.

## Add a new link

To add a new link to a Bayesian network or Dynamic Bayesian network, select a node in the
**From** drop down and a node in the **To** drop down.

The **Ellipsis** buttons allow one or more nodes to be selected from a list if you want to add multiple links at once,
and also allows sorting and filtering which is useful when the network contains a large number of nodes.

The **Delete** button clears the currently selected node(s).

The **Swap** button located between the two drop downs, changes the **From** node(s) to the
**To** node(s), and vice versa.

When ready, click **OK** to add the link(s).

##### NOTE

This operation can be undone, by clicking the **Undo** button on the main window.

## Existing distributions

When a link is added, the variables in a node's distribution change. If distributions have been specified before the link is added, the behavior depends on the option Migrate Existing Distributions.

## Temporal links

When creating a link between two temporal nodes in a Dynamic Bayesian network,
a **Temporal Order** must be specified. A temporal order indicates that the
**From** node links to the **To** node at a future time. A value of zero,
indicates that they are linked at the same time.

##### NOTE

The **From** node and **To** node, can be the same node, if the node is a Temporal node, and the temporal order is greater than zero.

##### NOTE

Multiple links can be created between two temporal nodes (including the same node) if the temporal order is different.

To add multiple links with different orders in a single operation, the **Range** option can be set to true,
allowing the input of a minimum and maximum order. Multiple links will then be added, from the minimum to the maximum order (inclusive).

## Continuous Nodes

While a link can be specified from a Discrete node to a Continuous node, the reverse is not true. i.e. a link cannot be specified from a Continuous node to a discrete node.