Skip to content

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.

number

FrequencyTable

INVALID_CAPACITY unless capacity is an integer in [0, 2^31 - 1].