Lines Matching refs:parent
51 ret->parent = NULL;
112 *x traces the path, y is the parent of x.
127 newnode->parent = y;
158 x->parent = y->parent;
160 if(y->parent == NULL) /*y is the root which has at most one child x*/
164 if(y == y->parent->left)
165 y->parent->left = x;
167 y->parent->right = x;
178 y->parent = node->parent;
180 node->left->parent = y;
187 x->parent = y->parent;
189 assert(y->parent != NULL);
190 if(y == y->parent->left)
191 y->parent->left = x;
193 y->parent->right = x;
195 y->parent = node->parent;
198 node->left->parent = y;
199 node->right->parent = y;
201 if(node->parent != NULL) {
202 if(node->parent->left == node)
203 node->parent->left = y;
205 node->parent->right = y;
208 else /*node->parent is NULL: node is the root*/
252 treeNode *y = node->parent;
254 while(y != NULL && x == y->right) /*if y is a left parent of x*/
258 y = y->parent;
273 treeNode *y = node->parent;
275 while(y != NULL && x == y->left) /*if y is a right parent of x*/
278 y = y->parent;