Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BinaryIndexedTree

Hierarchy

  • BinaryIndexedTree

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

backend

backend: Backend

Methods

Private getReadQueries

  • getReadQueries(ind: IndType): keyof IndType[]

query

  • Gets the accumulated sum in the 'array' until ind (inclusive).

    Time: O(log(n))

    Parameters

    Returns Promise<ValType>

rangeQuery

  • If "to" is less than or equal "from" it returns zero. Both indexed from zero.

    Time: O(log(n))

    Parameters

    Returns Promise<ValType>

update

  • Increases the ind-th element in the 'array' by val

    Note: if ind is greater than or equal backend.maximum this function won't do anything

    Time: O(log(n))

    Parameters

    Returns Promise<void>

Generated using TypeDoc