code: function heapUpdate(i, w) {
      var a = heap[i]
      if(weights[a] === w) {
        return i
      }
      weights[a] = -Infinity
      heapUp(i)
      heapPop()
      weights[a] = w
      heapCount += 1
      return heapUp(heapCount-1)
    }
docs: Update heap item i