game-ai/src/main/java/com/jzy/game/ai/util/BinaryHeap.java
/**
     * Remove the object with minimum key from the heap.
     *
     * @return the object with minimum key of the heap
     */
Remove the object with minimum key from the heap.
@return the object with minimum key of the heap
Remove the object with minimum key from the heap . @return the object with minimum key of the heap
public E deleteMin() throws ArrayIndexOutOfBoundsException {
        if (!isEmpty()) {
            E returnValue = elements[1];
            elements[1] = elements[size];
            size--;
            percolateDown(1);
            return returnValue;
        } else {
            throw new ArrayIndexOutOfBoundsException();
        }
    }
public E deleteMin ( ) throws ArrayIndexOutOfBoundsException { if ( ! isEmpty ( ) ) { E returnValue = elements [ 1 ] ; elements [ 1 ] = elements [ size ] ; size -- ; percolateDown ( 1 ) ; return returnValue ; } else { throw new ArrayIndexOutOfBoundsException ( ) ; } }
Remove the object with minimum key from the heap.
Remove the object with minimum key from the heap .