.. index:: Link

.. _Link_label:

Link
====

A *link* in a :ref:`Bayesian network<about_bayesian_network>` defines a :ref:`causal link<casual_link>` from one chance node (:ref:`discrete<discrete_chance_node>` or :ref:`continuous<continuous_chance_node>`) to another.

In an :ref:`LIMID<About_Limited_Memory_Influence_Diagram>`, a link can mean one of three things:

1. It can be a causal link as in a pure Bayesian network. This is the case, when the link goes from a chance node or :ref:`decision node<decision_node>` to a chance node.
2. It can define the utility function to depend on a chance node or a decision node. This is the case if the link goes from a chance node or decision node to a :ref:`utility node<utility_node>`.
3. It can specify the information available to the decision maker. This is the case if the link goes from a chance node or decision node to a decision node. These links are referred to as *informational links*.

In an object-oriented Bayesian network (or LIMID), a link is defined as above, except if the link points to an :ref:`input node<input_node>` of an :ref:`instance node<instance_node>`.  In that case the link is interpreted as a :ref:`binding link<binding_link>` (i.e., the input node is bound to the node at the other end of the link).

A link can be established in :ref:`Edit Mode<Edit_mode>` by activating the :ref:`Link Tool<link_tool>` and dragging a line from one :ref:`node<node_category>` to another.

There are three different display modes for a link:

1. *Normal*: A straight line from one node to another.
2. *Spline*: A bezier line (i.e., a curve that passes over every 3 points of a series).
3. *Lines*: A series of straight lines.

The display mode for a link is selected by first selecting the link (i.e., left-click at or near the link so it gets highlighted), then right-clicking at the background of the :ref:`Network Pane<network_pane>` to activate the pop-up menu for the pane, then selecting the Link Mode item, and finally selecting the desired mode from the Link Mode sub-menu (see Figure 1).

.. figure:: images/linkmode.png

	Figure 1: There are three different display modes for a link.

New bezier points a created simply by click-and-drag operations. Figure 2 shows a link with two bezier points, displayed in Spline mode and Lines mode, respectively. The bezier points can be moved using click-and-drag operations. Please note that if a bezier point is moved to a location lying on the line between its neighboring points, it will be removed.

|linkmode1| |linkmode2|
         
Figure 2: There are three different display modes for a link.

.. |linkmode1| image:: images/linkmode1.png
.. |linkmode2| image:: images/linkmode3.png