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

Method build

Data Structures/SQRT Tree.cpp:72–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 void build(int layer, int lBound, int rBound, int betweenOffs) {
73 if (layer >= (int)layers.size()) {
74 return;
75 }
76 int bSz = 1 << ((layers[layer] + 1) >> 1);
77 for (int l = lBound; l < rBound; l += bSz) {
78 int r = min(l + bSz, rBound);
79 buildBlock(layer, l, r);
80 build(layer + 1, l, r, betweenOffs);
81 }
82 if (layer == 0) {
83 buildBetweenZero();
84 } else {
85 buildBetween(layer, lBound, rBound, betweenOffs);
86 }
87 }
88
89 void update(int layer, int lBound, int rBound, int betweenOffs, int x) {
90 if (layer >= (int)layers.size()) {

Callers

nothing calls this directly

Calls 2

buildFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected