Trait fenwick_bit_tree::FenwickTree
source · pub trait FenwickTree {
type Value: FenwickTreeValue;
// Required methods
fn query(&self, idx: &TreeIndex) -> Result<Self::Value, String>;
fn update(
&mut self,
idx: &TreeIndex,
value: Self::Value
) -> Result<(), String>;
// Provided method
fn range_query(
&self,
from: &TreeIndex,
to: &TreeIndex
) -> Result<Self::Value, String> { ... }
}Expand description
Fenwick tree trait, API of that datastructure