pike.git / lib / modules / ADT.pmod / Heap.pike

version» Context lines:

pike.git/lib/modules/ADT.pmod/Heap.pike:111:    if(num_values * 3 + 10 < sizeof(values))    values=values[..num_values+10];    }    verify_heap();    return ret;   }      //! Returns the number of elements in the heap.   int _sizeof() { return num_values; }    - //! Removes and returns the item on top of the heap, - //! which also is the smallest value in the heap. - //! @deprecated pop - __deprecated__ mixed top() { return pop(); } -  - //! Returns the number of elements in the heap. - //! @deprecated lfun::_sizeof - __deprecated__ int size() { return _sizeof(); } -  +    //! Returns the item on top of the heap (which is also the smallest value   //! in the heap) without removing it.   mixed peek()   {    if (!num_values)    return UNDEFINED;       return values[0];   }