MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / maintain

Method maintain

libCacheSim/dataStructure/splaytree.hpp:19–33  ·  view source on GitHub ↗

size of childs

Source from the content-addressed store, hash-verified

17 V sum;
18 uint32_t size; // size of childs
19 void maintain()
20 {
21 size = 1;
22 sum = second;
23 if (left)
24 {
25 size += left->size;
26 sum += left->sum;
27 }
28 if (right)
29 {
30 size += right->size;
31 sum += right->sum;
32 }
33 }
34 };
35 typedef typename std::unique_ptr<node> node_ptr;
36

Callers 3

leftRotateMethod · 0.80
rightRotateMethod · 0.80
removeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected