1This directory contains a general purpose data structures, for use anywhere
2in the backend:
3
4binaryheap.c - a binary heap
5
6hyperloglog.c - a streaming cardinality estimator
7
8pairingheap.c - a pairing heap
9
10rbtree.c - a red-black tree
11
12ilist.c - single and double-linked lists.
13
14stringinfo.c - an extensible string type
15
16
17Aside from the inherent characteristics of the data structures, there are a
18few practical differences between the binary heap and the pairing heap. The
19binary heap is fully allocated at creation, and cannot be expanded beyond the
20allocated size. The pairing heap on the other hand has no inherent maximum
21size, but the caller needs to allocate each element being stored in the heap,
22while the binary heap works with plain Datums or pointers.
23
24The linked-lists in ilist.c can be embedded directly into other structs, as
25opposed to the List interface in nodes/pg_list.h.
26