• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D08-Nov-2021505 196

READMEH A D08-Nov-2021890 2616

binaryheap.cH A D08-Nov-20216.8 KiB308155

bipartite_match.cH A D08-Nov-20214.1 KiB181116

hyperloglog.cH A D08-Nov-20216.9 KiB253101

ilist.cH A D08-Nov-20212.4 KiB11261

pairingheap.cH A D08-Nov-20217.7 KiB334178

rbtree.cH A D08-Nov-202120 KiB874507

stringinfo.cH A D08-Nov-20217.3 KiB290116

README

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