MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / change

Method change

cpp_easygraph/classes/segment_tree.cpp:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 }
27
28 void change(int p, const int &k) {
29 p += tn; this->t[p] = k; p >>= 1;
30 while (p) {
31 if (this->t[p<<1] < this->t[p<<1|1]) {
32 this->t[p] = this->t[p<<1];
33 this->num[p] = this->num[p<<1];
34 }
35 else {
36 this->t[p] = this->t[p<<1|1];
37 this->num[p] = this->num[p<<1|1];
38 }
39 p >>= 1;
40 }
41 }
42};

Callers 3

_dijkstraFunction · 0.80
closeness_dijkstraFunction · 0.80
betweenness_dijkstraFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected