Lines Matching refs:parent
38 parent: NodePtr<K, V>, field
98 parent: NodePtr::null(), in new()
151 self.parent().left() == *self in is_left_child()
156 self.parent().right() == *self in is_right_child()
184 if temp.parent().is_null() { in next()
188 return temp.parent(); in next()
190 temp = temp.parent(); in next()
202 if temp.parent().is_null() { in prev()
206 return temp.parent(); in prev()
208 temp = temp.parent(); in prev()
214 fn set_parent(&mut self, parent: NodePtr<K, V>) { in set_parent()
218 unsafe { (*self.0).parent = parent } in set_parent()
238 fn parent(&self) -> NodePtr<K, V> { in parent() method
242 unsafe { (*self.0).parent.clone() } in parent()
392 *node.parent().0, in tree_print()
885 temp.set_parent(node.parent()); in left_rotate()
888 } else if node == node.parent().left() { in left_rotate()
889 node.parent().set_left(temp.clone()); in left_rotate()
891 node.parent().set_right(temp.clone()); in left_rotate()
920 temp.set_parent(node.parent()); in right_rotate()
923 } else if node == node.parent().right() { in right_rotate()
924 node.parent().set_right(temp.clone()); in right_rotate()
926 node.parent().set_left(temp.clone()); in right_rotate()
962 let mut parent; in insert_fixup() localVariable
965 while node.parent().is_red_color() { in insert_fixup()
966 parent = node.parent(); in insert_fixup()
967 gparent = parent.parent(); in insert_fixup()
969 if parent == gparent.left() { in insert_fixup()
974 parent.set_black_color(); in insert_fixup()
981 if parent.right() == node { in insert_fixup()
982 self.left_rotate(parent); in insert_fixup()
983 let temp = parent; in insert_fixup()
984 parent = node; in insert_fixup()
989 parent.set_black_color(); in insert_fixup()
997 parent.set_black_color(); in insert_fixup()
1004 if parent.left() == node { in insert_fixup()
1005 self.right_rotate(parent); in insert_fixup()
1006 let temp = parent; in insert_fixup()
1007 parent = node; in insert_fixup()
1012 parent.set_black_color(); in insert_fixup()
1224 unsafe fn delete_fixup(&mut self, mut node: NodePtr<K, V>, mut parent: NodePtr<K, V>) { in delete_fixup()
1227 if parent.left() == node { in delete_fixup()
1228 other = parent.right(); in delete_fixup()
1232 parent.set_red_color(); in delete_fixup()
1233 self.left_rotate(parent); in delete_fixup()
1234 other = parent.right(); in delete_fixup()
1240 node = parent; in delete_fixup()
1241 parent = node.parent(); in delete_fixup()
1248 other = parent.right(); in delete_fixup()
1251 other.set_color(parent.get_color()); in delete_fixup()
1252 parent.set_black_color(); in delete_fixup()
1254 self.left_rotate(parent); in delete_fixup()
1259 other = parent.left(); in delete_fixup()
1263 parent.set_red_color(); in delete_fixup()
1264 self.right_rotate(parent); in delete_fixup()
1265 other = parent.left(); in delete_fixup()
1271 node = parent; in delete_fixup()
1272 parent = node.parent(); in delete_fixup()
1279 other = parent.left(); in delete_fixup()
1282 other.set_color(parent.get_color()); in delete_fixup()
1283 parent.set_black_color(); in delete_fixup()
1285 self.right_rotate(parent); in delete_fixup()
1298 let mut parent; in delete() localVariable
1310 if node.parent().left() == node { in delete()
1311 node.parent().set_left(replace); in delete()
1313 node.parent().set_right(replace); in delete()
1320 parent = replace.parent(); in delete()
1322 if parent == node { in delete()
1323 parent = replace; in delete()
1326 child.set_parent(parent); in delete()
1328 parent.set_left(child); in delete()
1333 replace.set_parent(node.parent()); in delete()
1339 self.delete_fixup(child, parent); in delete()
1352 parent = node.parent(); in delete()
1355 child.set_parent(parent); in delete()
1361 if parent.left() == node { in delete()
1362 parent.set_left(child); in delete()
1364 parent.set_right(child); in delete()
1369 self.delete_fixup(child, parent); in delete()