Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Link

Represents a directed link in a Bayesian network.

For Dynamic Bayesian Networks, an order can be specified to link temporal nodes between different time slices.

Hierarchy

  • Link

Index

Constructors

constructor

  • Initializes a new instance of the {@link com.bayesserver.Link} class with the parent node specified in [from] and the child in [to].

    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.

    exception

    ReferenceError Raised if either [from] or [to] is null.

    Parameters

    • from: Node

      The parent node.

    • to: Node

      The child node.

    Returns Link

  • Initializes a new instance of the {@link com.bayesserver.Link} class with a specified [temporalOrder], the parent node specified in [from] and the child in [to].

    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.

    exception

    ReferenceError Raised if either [from] or [to] is null.

    exception

    Error Raised if [temporalOrder] is negative.

    Parameters

    • from: Node

      The parent node.

    • to: Node

      The child node.

    • temporalOrder: number

      The temporal order. Must be greater than or equal to zero.

    Returns Link

Accessors

customProperties

  • Gets custom properties associated with this instance.

    Custom properties allow storage of custom information, which will be saved with the network.

    Returns CustomPropertyCollection

description

  • get description(): string
  • set description(value: string): void
  • Optional description for the link.

    Returns string

  • Optional description for the link.

    Parameters

    • value: string

    Returns void

from

  • The parent node of the directed link.

    Returns Node

index

  • get index(): number
  • 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.

    Returns number

network

  • The {@link com.bayesserver.Network} the link belongs to. Value will be null unless the link has been added to a network.

    Returns Network

noisyOrder

  • Gets a value which determines the nature of the causal effect between the parent node (from) and a noisy child node (to).

    This property has no effect if the child node is not a noisy node.

    Returns NoisyOrder

  • Sets a value which determines the nature of the causal effect between the parent node (from) and a noisy child node (to).

    This property has no effect if the child node is not a noisy node.

    Parameters

    Returns void

temporalOrder

  • get temporalOrder(): number
  • Gets the temporal order of the link. If the link is not temporal, zero will be returned.

    Returns number

to

  • The child node of the directed link.

    Returns Node

Methods

_rvt_x_

  • _rvt_x_(): void
  • Returns void

_setIndex

  • _setIndex(value: number): void
  • Parameters

    • value: number

    Returns void

_setNetwork

  • _setNetwork(value: Network): void
  • Parameters

    Returns void

copy

  • Creates a new link, copying the properties from this instance, such as {@link com.bayesserver.Link#getDescription} and {@link com.bayesserver.Link#getCustomProperties}.

    Parameters

    • from: Node

      The parent node.

    • to: Node

      The child node.

    • temporalOrder: number

      The temporal order. Must be greater than or equal to zero.

    Returns Link

    A new link instance.