Add a leaf to the tree.
        :param value: hash value (as a Buffer) or hex string
        :param do_hash: whether to hash value
344574
def add_leaf(self, value, do_hash=False):
        
        self.tree['is_ready'] = False
        self._add_leaf(value, do_hash)
75790
def nodes(self, value):
        
        # pylint: disable=attribute-defined-outside-init
        self._nodes = value
        self._index2node = {node.index: node for node in self._nodes}
89582
public function append($value)
    {
        $value = trim($value);

        if ( ! empty($value)) {

            $hash = md5($value);
            if ( ! in_array($hash, $this->hashes)) {
                parent::append($value);
                $this->hashes[] = $hash;
            }
        }
    }
523289
def add(self, item):
        ""
        for pos in self._hashes(item):
            self.hash |= (2 ** pos)
1298529
def add_child(self, tree):
        '''
        '''
        tree.parent = self
        self.children.append(tree)
        return tree
445985
def encode_leaf_node(value):
    
    validate_is_bytes(value)
    if value is None or value == b'':
        raise ValidationError("Value of leaf node can not be empty")
    return LEAF_TYPE_PREFIX + value
399817
def wrap_value(value, lookup)
      if value.is_a?(Array)
        new_array_model(value, @options.merge(parent: self, path: path + lookup))
      elsif value.is_a?(Hash)
        new_model(value, @options.merge(parent: self, path: path + lookup))
      else
        value
      end
    end
1007786
private static function insertNonFull($value, $btree)
	{
		$i = 0;
		while ($i<$btree->_n && $value->greaterThan($btree->_keys[$i]))
		{
			$i++;
		}
		if (@$btree->_children[$i]==null)
		{		       // Leaf node
			$btree->shiftUp($i, $value);
			$btree->_children[$i+1] = null;
		}
		elseif ($btree->_children[$i]->full())
		{	       // Full child
			$pivot = $btree->_children[$i]->_keys[self::T-1];
			$btree->shiftUp($i, $pivot);
			$btree->_children[$i+1] =  $btree->_children[$i]->split();
			self::insertNonFull($value,  $btree->_children[($value->greaterThan($pivot)) ? ($i+1) : $i]);
		}
		else
		{				       // Non-full child
			self::insertNonFull($value, $btree->_children[$i]);
		}
	}
410958
def set_value(self, treeiter, column, value):
        

        value = self._convert_value(column, value)
        Gtk.TreeStore.set_value(self, treeiter, column, value)
1091879
def leaf_keyvalue node
    h = {}
    node.children.each do |child|
      next unless child.element?
      h[child.name] = child.content
    end
    [h['key'], h['value']]
  end
339781
def assoc(self, index, value):
        ''''''
        newnode = LookupTreeNode(index, value)
        newtree = LookupTree()
        newtree.root = _assoc_down(self.root, newnode, 0)
        return newtree
357183
def add(value, options = {})
      # Set defaults
      options[:duplication_filter] = :do_not_add unless options.key?(:duplication_filter)

      # Get path
      path = get_array

      # Check duplicates
      if path.member?(value)
        case options[:duplication_filter]
        when :do_not_add, :deny
          # do nothing, we already have one in the list
          return
        when :remove_existing
          path.delete!(value)
        when :none
          # just pass through
        else
          raise WrongOptionError, "Unknown :duplication_filter!"
        end
      end

      # Change path array
      case options[:where]
      when :start, :left
        path.unshift value
      when :end, :right
        path.push value
      else
        raise WrongOptionError, "Unknown :where!"
      end

      # Save new array
      set_array(path)
    end
697903
def add_child(self, value):
        
        child = FPNode(value, 1, self)
        self.children.append(child)
        return child
772238
def add_tree(self, tree, parent=None):
        
        if tree.path in self.path_db:
            self.remove_tree_by_path(tree.path)

        # index all indexable attributes
        for index in tree.indexes:
            if not getattr(tree, index):
                continue

            self._add_to(
                getattr(self, index + "_db"),
                getattr(tree, index),
                tree,
            )

        if parent:
            self._add_to(self.parent_db, tree.path, parent)

        # make sure, that all sub-trees starts with path of parent tree
        for sub_tree in tree.sub_trees:
            assert sub_tree.path.startswith(tree.path)

        for sub_tree in tree.sub_trees:
            self.add_tree(sub_tree, parent=tree)
323287
def insert(self, value):
        
        side = '_lesser' if value < self.value else '_greater'
        child = getattr(self, side)
        if child is None:
            setattr(self, side, _BinarySearchTree(value))
        else:
            child.insert(value)
268619
def _add_hash(cls, attrs):
    
    cls.__hash__ = _make_hash(attrs, frozen=False, cache_hash=False)
    return cls
1259367
def add_transaction(self,
                        block_header: BlockHeader,
                        index_key: int,
                        transaction: 'BaseTransaction') -> Hash32:
        
        transaction_db = HexaryTrie(self.db, root_hash=block_header.transaction_root)
        transaction_db[index_key] = rlp.encode(transaction)
        return transaction_db.root_hash