Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TableIterator

Allows sequential access to the values in a {@link com.bayesserver.Table}, using a preferred variable ordering, as opposed to the default sorted order specified in {@link com.bayesserver.Table#getSortedVariables}.

see

com.bayesserver.TableAccessor

see

com.bayesserver.Table

Hierarchy

  • TableIterator

Index

Constructors

constructor

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if order does not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: IList<Variable>

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if order does not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: Variable[]

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if order does not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: Variable[]

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    • times: number[]

      The times for the variables.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if order does not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: IList<Variable>

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    • times: IList<number | null>

      The times for the variables.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if the nodes in order do not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: IList<Node>

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    • times: IList<number | null>

      The times for the variables.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if the nodes in order do not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: Node[]

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    • times: number[]

      The times for the variables.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Any times that are contained within the {@link com.bayesserver.VariableContextCollection} will be used.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if order does not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: VariableContextCollection

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if the nodes in order do not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: IList<Node>

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    exception

    ReferenceError Raised if either [table] or [order] is null.

    exception

    Error Raised if the nodes in order do not contain the same variables as [table].

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: Node[]

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Any times that are contained within the {@link com.bayesserver.VariableContextCollection} will be used. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: IList<VariableContext>

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

  • Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables at specified times. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the variables. Any times that are contained within the {@link com.bayesserver.VariableContextCollection} will be used. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables. Initializes a new instance of the {@link com.bayesserver.TableIterator} class, allowing sequential access to [table] with a specified [order] for the node variables.

    Parameters

    • table: Table

      The table whose values are to be accessed.

    • order: VariableContext[]

      The order in which the variables should be accessed. The last variable's states toggle fastest.

    Returns TableIterator

Accessors

row

  • get row(): number
  • Gets the current position of the iterator. For the position in the underlying {@link com.bayesserver.Table} see {@link com.bayesserver.TableIterator#getTableRow}.

    Returns number

    The row.

size

  • get size(): number
  • Gets the count of values in the underlying {@link com.bayesserver.Table}.

    Returns number

    The count.

table

  • Gets the underlying {@link com.bayesserver.Table}.

    Returns Table

    The underlying {@link com.bayesserver.Table}.

tableRow

  • get tableRow(): number
  • Gets the position of the iterator in the underlying {@link com.bayesserver.Table}. For the position of the iterator see {@link com.bayesserver.TableIterator#getRow}.

    Returns number

    The table row.

value

  • get value(): number
  • set value(value: number): void
  • Gets the underlying {@link com.bayesserver.Table} value at the current position of the iterator.

    Returns number

    The underlying {@link com.bayesserver.Table} value.

  • Sets the underlying {@link com.bayesserver.Table} value at the current position of the iterator.

    Parameters

    • value: number

      The underlying {@link com.bayesserver.Table} value.

    Returns void

    The underlying {@link com.bayesserver.Table} value.

Methods

copyFrom

  • copyFrom(values: number[]): void
  • Resets the iterator and then copies values from an array into the underlying {@link com.bayesserver.Table} using the variable ordering of the {@link com.bayesserver.TableIterator}, not the {@link com.bayesserver.Table#getSortedVariables}.

    At the end of the operation the iterator will be reset to the start.

    exception

    ReferenceError Raised if [values] is null.

    exception

    Error Raised if [values] is too short.

    Parameters

    • values: number[]

      An array of values to copy.

    Returns void

getState

  • getState(i: number): number
  • Gets the state for an individual node indexed by the order of nodes in the {@link com.bayesserver.TableIterator}.

    Parameters

    • i: number

      The node position, based on the order of nodes in the {@link com.bayesserver.TableIterator}.

    Returns number

    The state.

getStates

  • getStates(states: number[]): void
  • Gets the states of all nodes, based on the order of nodes in the {@link com.bayesserver.TableIterator} not the underlying {@link com.bayesserver.Table}.

    exception

    ReferenceError Raised if [states] is null.

    exception

    Error Raised if [states] is too short.

    Parameters

    • states: number[]

      A array, whose values will be replaced. The [states] array must have length equal to or greater than the node count in the underlying {@link com.bayesserver.Table}.

    Returns void

increment

  • increment(): void
  • Moves the iterator to the next value, with respect to the {@link com.bayesserver.TableIterator} node order.

    Returns void

reset

  • reset(): void
  • Resets the iterator to the start.

    Returns void