Class Link
Represents a directed link in a Bayesian network.
Inheritance
Implements
Inherited Members
Namespace: BayesServer
Assembly: BayesServer.dll
Syntax
public sealed class Link : INotifyPropertyChanged, IChanged
Remarks
For Dynamic Bayesian Networks, an order can be specified to link temporal nodes between different time slices.
Constructors
Link(Node, Node)
Initializes a new instance of the Link class with the parent node specified in from
and the child in to
.
Declaration
public Link(Node from, Node to)
Parameters
Type | Name | Description |
---|---|---|
Node | from | The parent node. |
Node | to | The child node. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Raised if either |
Link(Node, Node, Int32)
Initializes a new instance of the Link class with a specified temporalOrder
, the parent node specified in from
and the child in to
.
Declaration
public Link(Node from, Node to, int temporalOrder)
Parameters
Type | Name | Description |
---|---|---|
Node | from | The parent node. |
Node | to | The child node. |
System.Int32 | temporalOrder | The temporal order. Must be greater than or equal to zero. |
Remarks
If a temporal order is specified that is greater than zero, then a link can connect two nodes (which may be the same) at different times.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Raised if either |
System.ArgumentException | Raised if |
Properties
CustomProperties
Gets custom properties associated with this instance.
Declaration
public CustomPropertyCollection CustomProperties { get; }
Property Value
Type | Description |
---|---|
CustomPropertyCollection |
Remarks
Custom properties allow storage of custom information, which will be saved with the network.
Description
Optional description for the link.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
From
The parent node of the directed link.
Declaration
public Node From { get; }
Property Value
Type | Description |
---|---|
Node |
Index
The Index of this instance in the collection of links belonging to a network, or -1 if the link does not belong to a network.
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Network
The Network the link belongs to. Value will be null unless the link has been added to a network.
Declaration
[Browsable(false)]
public Network Network { get; }
Property Value
Type | Description |
---|---|
Network |
NoisyOrder
Gets or sets a value which determines the nature of the causal effect between the parent node (from) and a noisy child node (to).
Declaration
public NoisyOrder NoisyOrder { get; set; }
Property Value
Type | Description |
---|---|
NoisyOrder |
Remarks
This property has no effect if the child node is not a noisy node.
TemporalOrder
Gets the temporal order of the link. If the link is not temporal, zero will be returned.
Declaration
public int TemporalOrder { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
To
The child node of the directed link.
Declaration
public Node To { get; }
Property Value
Type | Description |
---|---|
Node |
Methods
Copy(Node, Node, Int32)
Creates a new link, copying the properties from this instance, such as Description and CustomProperties.
Declaration
public Link Copy(Node from, Node to, int temporalOrder)
Parameters
Type | Name | Description |
---|---|---|
Node | from | The parent node. |
Node | to | The child node. |
System.Int32 | temporalOrder | The temporal order. Must be greater than or equal to zero. |
Returns
Type | Description |
---|---|
Link | A new link instance. |
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |