Lines Matching refs:child

74                            struct heap_node* child) {  in heap_node_swap()  argument
79 *parent = *child; in heap_node_swap()
80 *child = t; in heap_node_swap()
82 parent->parent = child; in heap_node_swap()
83 if (child->left == child) { in heap_node_swap()
84 child->left = parent; in heap_node_swap()
85 sibling = child->right; in heap_node_swap()
87 child->right = parent; in heap_node_swap()
88 sibling = child->left; in heap_node_swap()
91 sibling->parent = child; in heap_node_swap()
98 if (child->parent == NULL) in heap_node_swap()
99 heap->min = child; in heap_node_swap()
100 else if (child->parent->left == parent) in heap_node_swap()
101 child->parent->left = child; in heap_node_swap()
103 child->parent->right = child; in heap_node_swap()
110 struct heap_node** child; in HEAP_EXPORT() local
127 parent = child = &heap->min; in HEAP_EXPORT()
129 parent = child; in HEAP_EXPORT()
131 child = &(*child)->right; in HEAP_EXPORT()
133 child = &(*child)->left; in HEAP_EXPORT()
140 *child = newnode; in HEAP_EXPORT()
155 struct heap_node* child; in HEAP_EXPORT() local
184 child = *max; in HEAP_EXPORT()
187 if (child == node) { in HEAP_EXPORT()
189 if (child == heap->min) { in HEAP_EXPORT()
196 child->left = node->left; in HEAP_EXPORT()
197 child->right = node->right; in HEAP_EXPORT()
198 child->parent = node->parent; in HEAP_EXPORT()
200 if (child->left != NULL) { in HEAP_EXPORT()
201 child->left->parent = child; in HEAP_EXPORT()
204 if (child->right != NULL) { in HEAP_EXPORT()
205 child->right->parent = child; in HEAP_EXPORT()
209 heap->min = child; in HEAP_EXPORT()
211 node->parent->left = child; in HEAP_EXPORT()
213 node->parent->right = child; in HEAP_EXPORT()
221 smallest = child; in HEAP_EXPORT()
222 if (child->left != NULL && less_than(child->left, smallest)) in HEAP_EXPORT()
223 smallest = child->left; in HEAP_EXPORT()
224 if (child->right != NULL && less_than(child->right, smallest)) in HEAP_EXPORT()
225 smallest = child->right; in HEAP_EXPORT()
226 if (smallest == child) in HEAP_EXPORT()
228 heap_node_swap(heap, child, smallest); in HEAP_EXPORT()
235 while (child->parent != NULL && less_than(child, child->parent)) in HEAP_EXPORT()
236 heap_node_swap(heap, child->parent, child); in HEAP_EXPORT()