private void delete(Node<K, V> n) {
        if (n != root && n.o_s == null && n.poolIndex == Node.NO_INDEX) {
            // no root, no parent and no pool index
            throw new IllegalArgumentException("Invalid handle!");
        }

        // node has a parent
        if (n.o_s != null) {
            // cut oldest child
            Node<K, V> oldestChild = cutOldestChild(n);
            if (oldestChild != null) {
                linkInPlace(oldestChild, n);
            } else {
                cutFromParent(n);
            }
        }

        // node has no parent
        // cut children
        Node<K, V> childrenTree = combine(cutChildren(n));
        boolean checkConsolidate = false;
        if (childrenTree != null) {
            checkConsolidate = true;
            addPool(childrenTree, true);
        }

        size--;
        if (n == root) {
            root = null;
            consolidate();
            checkConsolidate = false;
        } else if (n.poolIndex != Node.NO_INDEX) {
            byte curIndex = n.poolIndex;
            decreasePool[curIndex] = decreasePool[decreasePoolSize - 1];
            decreasePool[curIndex].poolIndex = curIndex;
            decreasePool[decreasePoolSize - 1] = null;
            decreasePoolSize--;
            n.poolIndex = Node.NO_INDEX;
            if (curIndex == decreasePoolMinPos) {
                // in decrease pool, and also the minimum
                consolidate();
                checkConsolidate = false;
            } else {
                // in decrease pool, and not the minimum
                if (decreasePoolMinPos == decreasePoolSize) {
                    decreasePoolMinPos = curIndex;
                }
                checkConsolidate = true;
            }
        }

        // if decrease pool has >= ceil(logn) trees, consolidate
        if (checkConsolidate) {
            double sizeAsDouble = size;
            if (decreasePoolSize >= Math.getExponent(sizeAsDouble) + 1) {
                consolidate();
            }
        }
    }
private void delete ( Node < K , V > n ) { if ( n != root && n . o_s == null && n . poolIndex == Node . NO_INDEX ) { throw new IllegalArgumentException ( "Invalid handle!" ) ; } if ( n . o_s != null ) { Node < K , V > oldestChild = cutOldestChild ( n ) ; if ( oldestChild != null ) { linkInPlace ( oldestChild , n ) ; } else { cutFromParent ( n ) ; } } Node < K , V > childrenTree = combine ( cutChildren ( n ) ) ; boolean checkConsolidate = false ; if ( childrenTree != null ) { checkConsolidate = true ; addPool ( childrenTree , true ) ; } size -- ; if ( n == root ) { root = null ; consolidate ( ) ; checkConsolidate = false ; } else if ( n . poolIndex != Node . NO_INDEX ) { byte curIndex = n . poolIndex ; decreasePool [ curIndex ] = decreasePool [ decreasePoolSize - 1 ] ; decreasePool [ curIndex ] . poolIndex = curIndex ; decreasePool [ decreasePoolSize - 1 ] = null ; decreasePoolSize -- ; n . poolIndex = Node . NO_INDEX ; if ( curIndex == decreasePoolMinPos ) { consolidate ( ) ; checkConsolidate = false ; } else { if ( decreasePoolMinPos == decreasePoolSize ) { decreasePoolMinPos = curIndex ; } checkConsolidate = true ; } } if ( checkConsolidate ) { double sizeAsDouble = size ; if ( decreasePoolSize >= Math . getExponent ( sizeAsDouble ) + 1 ) { consolidate ( ) ; } } }
Delete a node.

@param n
the node