Add a value to an element.
The first element is at position 1 (1-based).
Raise an exception if index
<= 0 or index
> f.sizeck/fenwick/size: forall<h> (f : fenwick<h>) -> (read<h>) int
.
Create a Fenwick tree.
Return the sum from the first element to the end
-th element (inclusive).
The first element is at position 1 (1-based).
For convenience, return 0 if end
= 0.
Raise an exception if end
< 0 or end
> f.sizeck/fenwick/size: forall<h> (f : fenwick<h>) -> (read<h>) int
.
Fenwick tree
.