fenwickFrequencyTable(
capacity):FrequencyTable
Defined in: packages/frequency-table/src/fenwick-frequency-table.ts:63
Create an empty binary indexed tree. Count, add, sum and selection take O(log(capacity + 1)). Construction and clearing take O(capacity + 1) and counters occupy 4(capacity + 1) bytes.
Parameters
Section titled “Parameters”capacity
Section titled “capacity”number
Returns
Section titled “Returns”Throws
Section titled “Throws”INVALID_CAPACITY unless capacity is an integer in [0, 2^31 - 1].