]> mj.ucw.cz Git - libucw.git/blobdiff - lib/heap.h
actually, the number of runs is halved during each pass, so take it into
[libucw.git] / lib / heap.h
index a70fb2cd8c806551fe87b995e013913a3f581e4d..8404858e6a516d9f318e340c7b324012d7003545 100644 (file)
@@ -82,3 +82,6 @@
     else                                                                               \
       HEAP_BUBBLE_DOWN_J(heap,num,less,swap);                                          \
   } while(0)
+
+/* Default swapping macro */
+#define HEAP_SWAP(heap,a,b,t) (t=heap[a], heap[a]=heap[b], heap[b]=t)