Fenwick Tree [詳解]
#include "fenwick_tree_abel.hpp"
公開型 | |
using | Type = typename Abel::Type |
公開メンバ関数 | |
FenwickTreeAbel ()=default | |
FenwickTreeAbel (int n) | |
サイズ n のFenwick Treeを構築する | |
void | add (int i, Type x) |
i 番目の要素に対し v[i] <- op(v[i], x) と更新する | |
Type | sum (int l, int r) |
区間 [l, r) の群積を返す | |
Type | operator[] (int i) |
i 番目の要素を返す | |
int | size () |
配列のサイズを返す | |
Fenwick Tree
Abel | 可換群 |
fenwick_tree_abel.hpp の 8 行目に定義があります。
using FenwickTreeAbel< Abel >::Type = typename Abel::Type |
fenwick_tree_abel.hpp の 9 行目に定義があります。
|
default |
|
inline |
サイズ n のFenwick Treeを構築する
fenwick_tree_abel.hpp の 13 行目に定義があります。
|
inline |
|
inline |
|
inline |
|
inline |
配列のサイズを返す
fenwick_tree_abel.hpp の 39 行目に定義があります。