public void increaseKey(int i,Key key){
  if (i < 0 || i >= nmax)   throw new IndexOutOfBoundsException();
  if (!contains(i))   throw new NoSuchElementException("Specified index is not in the queue");
  if (comp.compare(keys[i + d],key) >= 0)   throw new IllegalArgumentException("Calling with this argument would not increase the Key");
  keys[i + d]=key;
  sink(qp[i + d]);
}

public void increaseKey ( int i , Key key ) { if ( i < 0 || i >= nmax ) throw new IndexOutOfBoundsException ( ) ; if ( ! contains ( i ) ) throw new NoSuchElementException ( "Specified index is not in the queue" ) ; if ( comp . compare ( keys [ i + d ] , key ) >= 0 ) throw new IllegalArgumentException ( "Calling with this argument would not increase the Key" ) ; keys [ i + d ] = key ; sink ( qp [ i + d ] ) ; }
increases the key associated with index i to the given key worst case is o ( d * log - d ( n ) )
