(i Comparable)
| 62 | } |
| 63 | |
| 64 | func (h MaxHeap) Update(i Comparable) { |
| 65 | h.slice[h.indices[i.Idx()]] = i |
| 66 | h.heapifyUp(h.indices[i.Idx()]) |
| 67 | h.heapifyDown(h.indices[i.Idx()]) |
| 68 | } |
| 69 | |
| 70 | func (h MaxHeap) updateidx(i int) { |
| 71 | h.indices[h.slice[i].Idx()] = i |
no test coverage detected