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

Method init

cpp_easygraph/classes/segment_tree.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 this->num = std::vector<int>(size+1 , 0);
14 }
15 void init(int N) {
16 for(int i = 0; i < size; i++){
17 this->t[i] = INT_MAX;
18 this->num[i] = 0;
19 }
20
21 tn = 1;
22 while(tn < N) tn <<= 1;
23 --tn;
24 for (int i = 1; i <= N; ++i)
25 this->num[i + tn] = i;
26 }
27
28 void change(int p, const int &k) {
29 p += tn; this->t[p] = k; p >>= 1;

Callers 3

_dijkstraFunction · 0.80
closeness_dijkstraFunction · 0.80
betweenness_dijkstraFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected