MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / buildBlock

Method buildBlock

Data Structures/SQRT Tree.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 vector< vector<SqrtTreeItem> > pref, suf, between;
31
32 inline void buildBlock(int layer, int l, int r) {
33 pref[layer][l] = v[l];
34 for (int i = l + 1; i < r; i++) {
35 pref[layer][i] = op(pref[layer][i - 1], v[i]);
36 }
37 suf[layer][r - 1] = v[r - 1];
38 for (int i = r - 2; i >= l; i--) {
39 suf[layer][i] = op(v[i], suf[layer][i + 1]);
40 }
41 }
42
43 inline void buildBetween(int layer, int lBound, int rBound, int betweenOffs) {
44 int bSzLog = (layers[layer] + 1) >> 1;

Callers

nothing calls this directly

Calls 1

opFunction · 0.70

Tested by

no test coverage detected