A simple efficient tree-based index for maintaining bindings, and checking whether or not a bindings is contained in this index.

This will consider bindings with a variable term or an undefined term as a 'match-all' with other terms.

Type Parameters

  • V

Implements

Constructors

Methods

  • Get the value of the given bindings is contained in this index.

    Parameters

    • bindings: Bindings

      A bindings.

    Returns V[]

    The values.

  • Get the first value of the given bindings is contained in this index.

    Parameters

    • bindings: Bindings

      A bindings.

    • matchUndefsAsWildcard: boolean = true

      If undefs in the given bindings should match with any existing values. Otherwise, undefs will only match values that were inserted as undefs.

    Returns undefined | V

    The value.

  • Parameters

    • bindings: Bindings
    • keys: Variable[]
    • dataIndexes: IDataIndex<V>[]
    • matchUndefsAsWildcard: boolean

    Returns undefined | V