GNU Info

Info Node: (slib.info)Priority Queues

(slib.info)Priority Queues


Next: Queues Prev: Object Up: Data Structures
Enter node , (file) or (file)node

Priority Queues
---------------

  `(require 'priority-queue)'

 - Function: make-heap pred<?
     Returns a binary heap suitable which can be used for priority queue
     operations.

 - Function: heap-length heap
     Returns the number of elements in HEAP.

 - Procedure: heap-insert! heap item
     Inserts ITEM into HEAP.  ITEM can be inserted multiple times.  The
     value returned is unspecified.

 - Function: heap-extract-max! heap
     Returns the item which is larger than all others according to the
     PRED<? argument to `make-heap'.  If there are no items in HEAP, an
     error is signaled.

  The algorithm for priority queues was taken from `Introduction to
Algorithms' by T. Cormen, C. Leiserson, R. Rivest.  1989 MIT Press.


automatically generated by info2www version 1.2.2.9