Lines Matching defs:leaf
29225 // Try to push key-value pair into the current leaf node.
29261 // Go down to the right-most leaf again.
29562 /// returns a `GoDown` with the handle of the leaf edge where the key belongs.
29578 Leaf(leaf) => return GoDown(leaf),
29594 /// If not found, returns an `Err` with the leaf edge matching the entire
29822 // root node that is an empty leaf.
29960 Leaf(leaf) => {
29966 Leaf(leaf) => leaf,
29970 let mut in_edge = leaf.first_edge();
30127 /// drop an entire tree without the need to first look up a `back` leaf edge.
31422 /// Contains a leaf edge preceding the next element to be returned, or the last leaf edge.
31423 /// Empty if the map has no root, if iteration went beyond the last leaf edge,
33779 /// Finds the distinct leaf edges delimiting a specified range in a tree.
33853 /// Finds the pair of leaf edges delimiting a specific range in a tree.
33867 /// Finds the pair of leaf edges delimiting an entire tree.
33874 /// Splits a unique reference into a pair of leaf edges delimiting a specified range.
33892 /// Splits a unique reference into a pair of leaf edges delimiting the full range of the tree.
33904 /// Splits a unique reference into a pair of leaf edges delimiting the full range of the tree.
33918 /// Given a leaf edge handle, returns [`Result::Ok`] with a handle to the neighboring KV
33919 /// on the right side, which is either in the same leaf node or in an ancestor node.
33920 /// If the leaf edge is the last one in the tree, returns [`Result::Err`] with the root node.
33939 /// Given a leaf edge handle, returns [`Result::Ok`] with a handle to the neighboring KV
33940 /// on the left side, which is either in the same leaf node or in an ancestor node.
33941 /// If the leaf edge is the first one in the tree, returns [`Result::Err`] with the root node.
33987 /// Given a leaf edge handle into a dying tree, returns the next leaf edge
33989 /// in the same leaf node, in an ancestor node, or non-existent.
34015 /// Given a leaf edge handle into a dying tree, returns the next leaf edge
34017 /// in the same leaf node, in an ancestor node, or non-existent.
34043 /// Deallocates a pile of nodes from the leaf up to the root.
34058 /// Moves the leaf edge handle to the next leaf edge and returns references to the
34071 /// Moves the leaf edge handle to the previous leaf edge and returns references to the
34086 /// Moves the leaf edge handle to the next leaf edge and returns references to the
34101 /// Moves the leaf edge handle to the previous leaf and returns references to the
34118 /// Moves the leaf edge handle to the next leaf edge and returns the key and value
34136 /// Moves the leaf edge handle to the previous leaf edge and returns the key and value
34142 /// - That leaf edge was not previously returned by counterpart `next_unchecked`
34156 /// Returns the leftmost leaf edge in or underneath a node - in other words, the edge
34163 Leaf(leaf) => return leaf.first_edge(),
34169 /// Returns the rightmost leaf edge in or underneath a node - in other words, the edge
34176 Leaf(leaf) => return leaf.last_edge(),
34190 /// Visits leaf nodes and internal KVs in order of ascending keys, and also
34198 Leaf(leaf) => visit(Position::Leaf(leaf)),
34204 Leaf(leaf) => {
34205 visit(Position::Leaf(leaf));
34239 /// Returns the leaf edge closest to a KV for forward navigation.
34250 /// Returns the leaf edge closest to a KV for backward navigation.
35578 // i.e., a tree who's root is a leaf node at height 0.
35582 // i.e., a tree who's root is an internal node at height 1, with edges to leaf nodes.
35714 // - 6 elements in left leaf child
35715 // - 5 elements in right leaf child
37488 // Three levels; insertion finished at leaf while there is an empty node on the second level.
37571 // In a tree with 3 levels, if all but a part of the first leaf node is split off,
37586 // In a tree with 3 levels, if only part of the last leaf node is split off,
37738 /// the leaf edge corresponding to that former pair. It's possible this empties
37762 // distinct node type for the immediate parents of a leaf.
37784 // SAFETY: `new_pos` is the leaf we started from or a sibling.
37790 // SAFETY: We won't destroy or rearrange the leaf where `pos` is at
37793 // link to the parent inside the leaf.
37809 // Remove an adjacent KV from its leaf and then put it back in place of
37947 // - Trees must have uniform depth/height. This means that every path down to a leaf from a
37951 // For a leaf node, "having an edge" only means we can identify a position in the node,
37952 // since leaf edges are empty and need no data representation. In an internal node,
37970 /// The underlying representation of leaf nodes and part of the representation of internal nodes.
38004 let mut leaf = Box::new_uninit();
38005 LeafNode::init(leaf.as_mut_ptr());
38006 leaf.assume_init()
38014 /// node, allowing code to act on leaf and internal nodes generically without having to even check
38077 /// `Leaf`, the `NodeRef` points to a leaf node, when this is `Internal` the
38110 /// The pointer to the leaf or internal node. The definition of `InternalNode`
38141 fn from_new_leaf(leaf: Box<LeafNode<K, V>>) -> Self {
38142 NodeRef { height: 0, node: NonNull::from(Box::leak(leaf)), _marker: PhantomData }
38202 /// height means the node is a leaf itself. If you picture trees with the
38215 /// Exposes the leaf portion of any leaf or internal node.
38291 /// Exposes the leaf portion of any leaf or internal node in an immutable tree.
38300 let leaf = self.into_leaf();
38302 MaybeUninit::slice_assume_init_ref(leaf.keys.get_unchecked(..usize::from(leaf.len)))
38346 /// Borrows exclusive access to the leaf portion of any leaf or internal node.
38353 /// Offers exclusive access to the leaf portion of any leaf or internal node.
38414 let leaf = Self::as_leaf_ptr(&mut self);
38415 let keys = unsafe { ptr::addr_of!((*leaf).keys) };
38416 let vals = unsafe { ptr::addr_of_mut!((*leaf).vals) };
38453 let leaf = Self::as_leaf_ptr(self);
38454 unsafe { (*leaf).parent = Some(parent) };
38455 unsafe { (*leaf).parent_idx.write(parent_idx as u16) };
38463 let leaf = root_node.as_leaf_mut();
38464 leaf.parent = None;
38492 /// Panics if there is no internal level, i.e., if the root node is a leaf.
38926 let leaf = self.node.into_leaf();
38927 let k = unsafe { leaf.keys.get_unchecked(self.idx).assume_init_ref() };
38928 let v = unsafe { leaf.vals.get_unchecked(self.idx).assume_init_ref() };
38940 let leaf = self.node.into_leaf_mut();
38941 unsafe { leaf.vals.get_unchecked_mut(self.idx).assume_init_mut() }
38957 let leaf = self.node.as_leaf_mut();
38958 let key = leaf.keys.get_unchecked_mut(self.idx).assume_init_mut();
38959 let val = leaf.vals.get_unchecked_mut(self.idx).assume_init_mut();
38973 /// by taking care of leaf data.
39282 // Move leaf data.
39345 // Move leaf data.
39657 navigate::Position::Leaf(leaf) => {
39660 result += &format!("\n{}{:?}", indent, leaf.keys());
39797 /// Removes empty levels on the top, but keeps an empty leaf if the entire tree is empty.
49297 // leaf method to which various SpecFrom/SpecExtend implementations delegate when