MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / test_perf

Function test_perf

templates/binary-index-tree.cpp:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57void test_perf(){
58 int n = 100000;
59 std::vector<int> v(n);
60
61 for(int i=0; i<n; i++){
62 v[i] = rand()%n;
63 }
64
65 for(int k=0; k<1000; k++){
66 BinaryIndexedTree b(v);
67 for(int i=0; i<10000; i++){
68 int q = rand()%(n);
69 int x = b.Query(q);
70 }
71 v.push_back(k);
72 }
73}
74
75void test(){
76 int n = 100;

Callers

nothing calls this directly

Calls 1

QueryMethod · 0.80

Tested by

no test coverage detected