pub struct FenwickTree<T> { /* private fields */ }
Expand description

FenwickTree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers. https://en.wikipedia.org/wiki/Fenwick_tree

Implementations

Constructs a new FenwickTree. The size of FenwickTree should be specified by size.

Returns a sum of range [l, r)

Returns a sum of range [0, k)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.