Fenwick Tree [詳解]
#include "fenwick_tree.hpp"
公開型 | |
using | Type = typename Abel::Type |
公開メンバ関数 | |
FenwickTree ()=default | |
FenwickTree (int n) | |
void | add (int i, ll x) |
ll | sum (int l, int r) |
ll | operator[] (int i) |
int | size () |
FenwickTree ()=default | |
FenwickTree (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.hpp の 4 行目に定義があります。
using FenwickTree< Abel >::Type = typename Abel::Type |
fenwick_tree_abel.hpp の 10 行目に定義があります。
|
default |
|
inline |
fenwick_tree.hpp の 6 行目に定義があります。
|
default |
|
inline |
サイズ n のFenwick Treeを構築する
fenwick_tree_abel.hpp の 16 行目に定義があります。
|
inline |
fenwick_tree.hpp の 10 行目に定義があります。
|
inline |
fenwick_tree.hpp の 14 行目に定義があります。
|
inline |
fenwick_tree.hpp の 15 行目に定義があります。
参照先 sum().
|
inline |
fenwick_tree.hpp の 16 行目に定義があります。
|
inline |
|
inline |
|
inline |
|
inline |
配列のサイズを返す
fenwick_tree_abel.hpp の 44 行目に定義があります。