Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VariableContextCollection

Represents a read-only collection of variables.

Each variable in the collection may have an associated time if the Bayesian network is a Dynamic Bayesian network (DBN). A variable can only appear more than once in the collection if it has different times associated. All variables are marked as either head or tail. Head variables are those on the left, and tail variables are those on the right in the expression P(A|B).

Hierarchy

  • VariableContextCollection

Implements

Index

Constructors

constructor

Accessors

size

  • get size(): number
  • Gets the number of elements contained in the collection.

    Returns number

Methods

_2ad2e5f4b2884a52bf8bfc07ce8953d3

  • _2ad2e5f4b2884a52bf8bfc07ce8953d3(): void

__@iterator

_rqss_x_

  • _rqss_x_(p_autogen1: number): void
  • Parameters

    • p_autogen1: number

    Returns void

clear

  • clear(): void
  • Returns void

get

  • Gets the {@link com.bayesserver.Variable} object at the specified index.

    Parameters

    • index: number

      The zero-based index of the {@link com.bayesserver.Variable} to find.

    Returns VariableContext

    A {@link com.bayesserver.Variable}.

includes

  • Determines whether a {@link com.bayesserver.Variable} is in the collection.

    Parameters

    • variable: Variable

      The {@link com.bayesserver.Variable} to locate in the collection. The value can be null.

    Returns boolean

    true if [variable] is found in the collection; otherwise, false.

  • Determines whether a variable-time (and optionally Head/Tail) combination is contained in the collection.

    Parameters

    • variableContext: VariableContext

      The variableContext to match.

    • ignoreHeadTail: boolean

      When true, the Head and Tail specifications need not match.

    Returns boolean

    True if a match is found; false otherwise.

  • Determines whether a {@link com.bayesserver.Variable} is in the collection at the specified [time].

    Parameters

    • variable: Variable

      The {@link com.bayesserver.Variable} to locate in the collection. The value can be null.

    • time: number | null

      The time associated with the variable, if any. Can be null.

    Returns boolean

    true if [variable] is found in the collection; otherwise, false.

  • Parameters

    Returns boolean

includesAll

  • Determines whether all [items] are matched in the collection.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: IList<Variable>

      The items to locate in the collection. Cannot be null.

    Returns boolean

    true if all items were matched in the collection; otherwise, false.

  • Determines whether all [items] are matched in the collection.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: IList<Variable>

      The items to locate in the collection. Cannot be null.

    • times: IList<number | null>

      The times associated with [items]. Can be null.

    Returns boolean

    true if all items were matched in the collection; otherwise, false.

  • Determines whether all [items] are matched in the collection at the specified times.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: IList<VariableContext>

      The items to locate in the collection. Cannot be null.

    • ignoreHeadTail: boolean

      When true, head and tail specifications need not match.

    Returns boolean

    true if all items were matched in the collection; otherwise, false.

  • Determines whether all [items] are matched in the collection.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: VariableContextCollection

      The items to locate in the collection. Cannot be null.

    • ignoreHeadTail: boolean

      When true, the Head and Tail specifications need not match.

    Returns boolean

    true if all items were matched in the collection; otherwise, false.

includesAny

  • Determines whether any [items] are matched in the collection.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: VariableContextCollection

      The items to locate in the collection. Cannot be null.

    • ignoreHeadTail: boolean

      When true, the Head and Tail specifications need not match.

    Returns boolean

    true if any items were matched in the collection; otherwise, false.

  • Determines whether any [items] are matched in the collection.

    exception

    ReferenceError Raised when [items] is null.

    Parameters

    • items: IList<Variable>

      The items to locate in the collection. Cannot be null.

    • times: IList<number | null>

      The time for each variable. Each time can be null for non temporal variables. [times] can be null.

    Returns boolean

    true if any items were matched in the collection; otherwise, false.

indexOf

  • Determines the index of a specific {@link com.bayesserver.Variable} in the collection.

    Parameters

    • item: Variable

      The variable to find. The value can be null.

    Returns number

    The index of the variable or -1 if not found.

  • Determines the index of a specific variable-time combination in the collection.

    Parameters

    • variableContext: VariableContext

      The variable context to match.

    • ignoreHeadTail: boolean

      When true, the Head and Tail specifications need not match.

    Returns number

    The index of the variable or -1 if not found.

  • Determines the index of a specific {@link com.bayesserver.VariableContext} in the collection at the specified [time].

    Parameters

    Returns number

    The index of the variable context or -1 if not found.

  • Determines the index of a specific {@link com.bayesserver.Variable} in the collection at the specified [time].

    Parameters

    • variable: Variable

      The variable to find.

    • time: number | null

      The variable time. Can be null for non temporal variables.

    Returns number

    The index of the variable or -1 if not found.

insert

  • Parameters

    Returns void

push

  • Parameters

    Returns number

remove

  • Parameters

    Returns boolean

removeAt

set

  • Gets the {@link com.bayesserver.Variable} object at the specified index.

    Parameters

    • index: number

      The zero-based index of the {@link com.bayesserver.Variable} to find.

    • value: VariableContext

    Returns void

toString

  • toString(): string
  • Returns a {@link String} that represents the current {@link Object}.

    Returns string

    A {@link String} that represents the current {@link Object}.