Struct NodeDistributionKey
Identifies a distribution assigned or to be assigned to a node.
Inherited Members
Namespace: BayesServer
Assembly: BayesServer.dll
Syntax
public struct NodeDistributionKey : IComparable<NodeDistributionKey>, IEquatable<NodeDistributionKey>
  Remarks
Some nodes may have more than one distribution assigned to them (e.g. temporal nodes or noisy nodes), and this is used to differentiate between them.
Constructors
NodeDistributionKey(Node)
Initializes a new instance of a NodeDistributionKey.
Declaration
public NodeDistributionKey(Node relatedNode)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Node | relatedNode | The parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node.  | 
      
NodeDistributionKey(Int32)
Initializes a new instance of a NodeDistributionKey.
Declaration
public NodeDistributionKey(int order)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | order | The temporal order of the node distribution.  | 
      
NodeDistributionKey(Int32, Node)
Initializes a new instance of a NodeDistributionKey.
Declaration
public NodeDistributionKey(int order, Node relatedNode)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | order | The temporal order of the related node distribution.  | 
      
| Node | relatedNode | The parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node.  | 
      
Properties
Default
Gets a default instance, which is equivalent to constructing a new instance with the default constructor.
Declaration
public static readonly NodeDistributionKey Default { get; }
  Property Value
| Type | Description | 
|---|---|
| NodeDistributionKey | 
Order
Gets the temporal order of the related node distribution.
Declaration
public readonly int Order { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
RelatedNode
Gets the parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node.
Declaration
public readonly Node RelatedNode { get; }
  Property Value
| Type | Description | 
|---|---|
| Node | 
Remarks
A noisy node is specified using multiple distributions, one for each parent and a leak distribution. Set the related node property to a parent, or set it to the current node to set the leak distribution.
Methods
CompareTo(NodeDistributionKey)
Declaration
public int CompareTo(NodeDistributionKey other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NodeDistributionKey | other | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Equals(NodeDistributionKey)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(NodeDistributionKey other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NodeDistributionKey | other | An object to compare with this object.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the current object is equal to the   | 
      
Equals(Object)
Declaration
public override bool Equals(object obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | obj | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Overrides
Operators
Equality(NodeDistributionKey, NodeDistributionKey)
Implements the operator ==.
Declaration
public static bool operator ==(NodeDistributionKey lhs, NodeDistributionKey rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NodeDistributionKey | lhs | The LHS.  | 
      
| NodeDistributionKey | rhs | The RHS.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | The result of the operator.  | 
      
Inequality(NodeDistributionKey, NodeDistributionKey)
Implements the operator !=.
Declaration
public static bool operator !=(NodeDistributionKey lhs, NodeDistributionKey rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NodeDistributionKey | lhs | The LHS.  | 
      
| NodeDistributionKey | rhs | The RHS.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | The result of the operator.  |