public void decrease(T node, int key){
        if(this.location.get(node)==-1 || this.location.get(node)==0){
            return;
        }
        int i = this.location.get(node);
        if(key<this.heap[i].getKey()){
            this.heap[i].setKey(key);
            while(i>1 && this.heap[parent(i)].getKey()>this.heap[i].getKey()){
                Node temp = this.heap[i];
                this.location.put((T)(this.heap[parent(i)].getData()), i);
                this.location.put((T)(temp.getData()), parent(i));
                this.heap[i]=this.heap[parent(i)];
                this.heap[parent(i)]=temp;
                i=parent(i);
            }
        }
    }