Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VariableContext

Represents a variable and associated information such as time, and whether it is marked as head or tail.

A {@link com.bayesserver.VariableContext} is used to store contextual information about a variable in a distribution, such as whether it is marked as head or tail, and time if the variable belongs to a temporal node. The same variable can appear more than once in a distribution if it appears at different times.

Hierarchy

  • VariableContext

Index

Constructors

constructor

  • Initializes a new instance of the {@link com.bayesserver.VariableContext} class, copying an existing instance.

    Parameters

    Returns VariableContext

  • Initializes a new instance of the {@link com.bayesserver.VariableContext} class. Time defaults to null and HeadTail to Head.

    Parameters

    Returns VariableContext

  • Initializes a new instance of the {@link com.bayesserver.VariableContext} class. Time defaults to null.

    Parameters

    • variable: Variable

      The variable.

    • headTail: HeadTail

      Indicates whether the variable is marked as head or tail.

    Returns VariableContext

  • Initializes a new instance of the {@link com.bayesserver.VariableContext} class. HeadTail defaults to Head.

    Parameters

    • variable: Variable

      The variable.

    • time: number | null

      The time associated with the variable. Can be null.

    Returns VariableContext

  • Initializes a new instance of the {@link com.bayesserver.VariableContext} class.

    Parameters

    • variable: Variable

      The variable.

    • time: number | null

      The time associated with the variable. Can be null.

    • headTail: HeadTail

      Indicates whether the variable is marked as head or tail.

    Returns VariableContext

Accessors

headTail

  • Specifies whether the variable is marked as Head or Tail.

    see

    com.bayesserver.HeadTail

    Returns HeadTail

    Specified either Head or Tail.

time

  • get time(): number | null
  • Gets the time associated with the variable if it belongs to a temporal node.

    Returns number | null

    The time associated with the variable. Null if the variable does not belong to a temporal node.

variable

  • Gets the variable.

    Returns Variable

    The variable.

Methods

_setHeadTail

  • Parameters

    Returns void

_setTime

  • _setTime(value: number | null): void
  • Parameters

    • value: number | null

    Returns void

isHead

  • isHead(): boolean
  • Determines whether this instance is marked as Head.

    see

    com.bayesserver.HeadTail

    Returns boolean

    true if this instance is marked as Head; otherwise, false.

isTail

  • isTail(): boolean
  • Determines whether this instance is marked as Tail.

    see

    com.bayesserver.HeadTail

    Returns boolean

    true if this instance is marked as Tail; otherwise, false.