예제 #1
0
        public T Push(S d)
        {
            var dd = (T)UpdatableHeapElements <S> .Create(d, heap.Count - 1);

            heap.Add(dd);
            top_down(heap.Count - 1);
            return(dd);
        }
예제 #2
0
 public void update(UpdatableHeapElements <T> elem)
 {
     queue.Update(elem);
 }