Delete a node from the heap.

@param n
the node
174476
protected void delete(Node<K, V> n) {
        if (n == root) {
            deleteMin();
            return;
        }

        if (n.y_s == null) {
            throw new IllegalArgumentException("Invalid handle!");
        }

        // disconnect and union children of node
        Node<K, V> childTree = unlinkAndUnionChildren(n);

        // find parent
        Node<K, V> p = getParent(n);

        // link children tree in place of node
        if (childTree == null) {
            // no children, just unlink from parent
            if (p.o_c == n) {
                if (n.y_s == p) {
                    p.o_c = null;
                } else {
                    p.o_c = n.y_s;
                }
            } else {
                p.o_c.y_s = p;
            }
        } else {
            // link children tree to parent
            if (p.o_c == n) {
                childTree.y_s = n.y_s;
                p.o_c = childTree;
            } else {
                p.o_c.y_s = childTree;
                childTree.y_s = p;
            }
        }

        size--;
        n.o_c = null;
        n.y_s = null;
    }
304176
public void remove(int node) {
        if (node == NIL) {
            throw new IllegalArgumentException();
        }
        if (left(node) != NIL && right(node) != NIL) {
            // inner node
            final int next = next(node);
            assert next != NIL;
            swap(node, next);
        }
        assert left(node) == NIL || right(node) == NIL;

        final int parent = parent(node);
        int child = left(node);
        if (child == NIL) {
            child = right(node);
        }

        if (child == NIL) {
            // no children
            if (node == root) {
                assert size() == 1 : size();
                root = NIL;
            } else {
                if (node == left(parent)) {
                    left(parent, NIL);
                } else {
                    assert node == right(parent);
                    right(parent, NIL);
                }
            }
        } else {
            // one single child
            if (node == root) {
                assert size() == 2;
                root = child;
            } else if (node == left(parent)) {
                left(parent, child);
            } else {
                assert node == right(parent);
                right(parent, child);
            }
            parent(child, parent);
        }

        release(node);
        rebalance(parent);
    }
68186
public void removeNode(int n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    this.removeElement(n);
  }
1020924
public boolean removeNameValueNode(NameValue node)
    {
        Map<String,NameValue> map = this.getValueMap(false);
        if (map == null)
            return false;   // Error
        return (map.remove(node.getKey()) == node);
    }
3132
public void removeEdge(N a, N b)
    {
        if(!containsBoth(a, b))
            return;
        nodes.get(a).getOutgoing().remove(b);
        nodes.get(b).getIncoming().remove(a);
    }
1004170
private function deleteNode( $node ) {
		$this->deleteChildren( $node );
		$parent = $node->parentNode;
		$oldnode = $parent->removeChild( $node );
	}
846781
protected void appendNode(Node n)
    {
        if (mRootNode != null) {
            mRootNode.appendChild(n);
        } else {
            mElement.appendChild(n);
        }
    }
1100281
void remove() {
        int nLen = length();
        for (int i = nLen - 1; i >= 0; i--) {
            XML xml = getXmlFromAnnotation(i);
            if (xml != null) {
                xml.remove();
                internalRemoveFromList(i);
            }
        }
    }
947106
@Procedure(mode = Mode.WRITE)
    @Description("apoc.index.removeNodeByName('name',node) remove node from an index for the given name")
    public void removeNodeByName(@Name("name") String name, @Name("node") Node node) {
        Index<Node> index = getNodeIndex(name, null);
        index.remove(node);
    }
1205782
public int removeAllChildren( Node node ) throws RepositoryException {
        isNotNull(node, "node");
        int childrenRemoved = 0;
        NodeIterator iter = node.getNodes();
        while (iter.hasNext()) {
            Node child = iter.nextNode();
            child.remove();
            ++childrenRemoved;
        }
        return childrenRemoved;
    }
437271
public void removeNode(N node)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.remove(node);
        if(p == null)
            return;
        //Outgoing edges we can ignore removint he node drops them. We need to avoid dangling incoming edges to this node we have removed
        HashSet<N> incomingNodes = p.getIncoming();
        for(N incomingNode : incomingNodes)
            nodes.get(incomingNode).getOutgoing().remove(node);
    }
1215928
private void delete(Node<K, V> n) {
        if (root == n) {
            deleteMin();
            n.o_c = null;
            n.y_s = null;
            n.o_s = null;
            return;
        }

        if (n.o_s == null) {
            throw new IllegalArgumentException("Invalid handle!");
        }

        // unlink from parent
        if (n.y_s != null) {
            n.y_s.o_s = n.o_s;
        }
        if (n.o_s.o_c == n) { // I am the oldest :(
            n.o_s.o_c = n.y_s;
        } else { // I have an older sibling!
            n.o_s.y_s = n.y_s;
        }
        n.y_s = null;
        n.o_s = null;

        // perform delete-min at tree rooted at this
        Node<K, V> t = combine(cutChildren(n));

        // and merge with other cut tree
        if (comparator == null) {
            root = link(root, t);
        } else {
            root = linkWithComparator(root, t);
        }

        size--;
    }
1000206
private void delete(RootListNode<K, V> n) {
        RootListNode<K, V> nPrev = n.prev;

        if (nPrev != null) {
            nPrev.next = n.next;
        } else {
            rootList.head = n.next;
        }

        if (n.next != null) {
            n.next.prev = nPrev;
        } else {
            rootList.tail = nPrev;
        }

        n.prev = null;
        n.next = null;
    }
848138
def delete(self, path, recursive=False):
        
        _log.debug("ZK: Deleting node " + path)
        return self.zk.delete(path, recursive=recursive)
1328234
protected Node<K, V> unlinkRightChild(Node<K, V> n) {
        Node<K, V> left = n.o_c;
        if (left == null || left.y_s == n) {
            return null;
        }
        Node<K, V> right = left.y_s;
        left.y_s = n;
        right.y_s = null;
        return right;
    }
1318275
public void remove(T node) {
		for (int i = 0; i < numberOfReplicas; i++) {
			circle.remove(hashFunc.hash(node.toString() + i));
		}
	}
136951
public static void removeName(Node n) {
    checkState(n.isFunction() || n.isClass());
    Node originalName = n.getFirstChild();
    Node emptyName = n.isFunction() ? IR.name("") : IR.empty();
    n.replaceChild(originalName, emptyName.useSourceInfoFrom(originalName));
  }