Lines Matching refs:tree

52     // Map type variable, representing a layer in the tree
55 // Initialize tree count for leaves
58 // Add the initial leaf layer to the tree
59 tree.push_back(tree_level);
64 // Initialize tree count for root
67 // Add the empty root layer to the tree
68 tree.push_back(tree_level);
70 // Add the initial root to the tree
71 tree[1][root_node->nodeIndex] = root_node;
77 for (auto& layer : tree) {
82 // Clear each layer in the tree
86 // Clear the tree
87 tree.clear();
120 // for example a node in layer 3 (tree[3]) can at most
164 tree[level].erase(node_n_index);
185 // removed from the tree. In both cases the tree is updated using
241 // Update tree is a tree balancing operation which maintains
242 // the binary tree structure. This method is called whenever
258 // new tree layer above and create a new Root node in it.
265 // nodes is created from root layer to tree[1](one layer
272 newRootNode->sumLeft = tree[getTreeDepth()][0]->sumRight +
273 tree[getTreeDepth()][0]->sumLeft;
276 newRootNode->discardLeft = tree[getTreeDepth()][0]->discardLeft &&
277 tree[getTreeDepth()][0]->discardRight;
279 // Map type variable, representing a layer in the tree
281 // Add a new layer to the tree
282 tree.push_back(treeLevel);
284 tree[getTreeDepth()][newRootNode->nodeIndex] = newRootNode;
288 tree[getTreeDepth() - 1][0]->parent = tree[getTreeDepth()][0];
302 newINode->parent = tree[i + 1][nextIndex[i + 1] - 1];
304 tree[i][newINode->nodeIndex] = newINode;
341 newINode->parent = tree[i + 1][nextIndex[i + 1] - 1];
343 tree[i][newINode->nodeIndex] = newINode;
350 // a new node. A feature to mark an old node in the tree is
373 // If found take address and Lookup in tree
374 // Update tree from leaves by making B(found index) = 0
390 // Call update tree operation on the tree starting with
393 stack_dist = updateSumsLeavesToRoot(tree[0][r_index], false);
394 newLeafNode = tree[0][r_index];
398 tree[0].erase(r_index);
410 // If index%2 == 0 then update tree
419 // Add new leaf node in the leaf layer (tree[0])
426 newLeafNode->parent = tree[1][nextIndex[1] - 1];
427 tree[0][index] = newLeafNode;
428 // call an update operation which would update the tree after
430 updateSumsLeavesToRoot(tree[0][index], true);
434 // This function checks the sanity of the tree to make sure the
438 sanityCheckTree(tree[0][index]);
472 // If found take address and Lookup in tree
482 _mark = tree[0][r_index]->isMarked;
484 tree[0][r_index]->isMarked = mark;
486 // Call get sums operation on the tree starting with
489 stack_dist = getSumsLeavesToRoot(tree[0][r_index]);
512 // Simple sanity check for the tree
570 DPRINTF(StackDist, "Printing last %d entries in tree\n", n);
573 for (auto it = tree[0].rbegin(); (count < n) && (it != tree[0].rend());