35 #ifndef __priorityq_sort_h_ 
   36 #define __priorityq_sort_h_ 
   44 #undef pqDeletePriorityQ 
   54 #define PQkey        PQSortKey 
   55 #define PQhandle     PQSortHandle 
   56 #define PriorityQ    PriorityQSort 
   58 #define pqNewPriorityQ(leq)   __gl_pqSortNewPriorityQ(leq) 
   59 #define pqDeletePriorityQ(pq) __gl_pqSortDeletePriorityQ(pq) 
   74 #define pqInit(pq)      __gl_pqSortInit(pq) 
   75 #define pqInsert(pq,key)   __gl_pqSortInsert(pq,key) 
   76 #define pqMinimum(pq)      __gl_pqSortMinimum(pq) 
   77 #define pqExtractMin(pq)   __gl_pqSortExtractMin(pq) 
   78 #define pqDelete(pq,handle)   __gl_pqSortDelete(pq,handle) 
   79 #define pqIsEmpty(pq)      __gl_pqSortIsEmpty(pq) 
   93 typedef PQHeapKey PQkey;
 
   94 typedef PQHeapHandle PQhandle;
 
   95 typedef struct PriorityQ PriorityQ;
 
  103   int    (*leq)(PQkey key1, PQkey key2);
 
  106 PriorityQ   *pqNewPriorityQ( 
int (*leq)(PQkey key1, PQkey key2) );
 
  107 void     pqDeletePriorityQ( PriorityQ *pq );
 
  109 int      pqInit( PriorityQ *pq );
 
  110 PQhandle pqInsert( PriorityQ *pq, PQkey key );
 
  111 PQkey    pqExtractMin( PriorityQ *pq );
 
  112 void     pqDelete( PriorityQ *pq, PQhandle handle );
 
  114 PQkey    pqMinimum( PriorityQ *pq );
 
  115 int      pqIsEmpty( PriorityQ *pq );