Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Data Structures, Containers, Collections

English · Français

Introduction

Most programs operate on data, either searching, sorting, iterating or simply insert and retrieve. Therefore, a means of data structures, containers and collections is required.

Free Pascal ships with numerous data structures, at different levels (RTL, FCL) but there are also third party solutions offering such feature.

Run time library (RTL)

Free Component Library (FCL)

FCL-Base

FCL-STL

Lazarus/LCL

3rd party

project license generic types notes
CL4L Public Domain no | al, as, ll, v, hm, hs, q, s Conversion of The Delphi Container Library. Provides algorithms like in STL (Apply, Found, CountObject, Copy, Generate, Fill, Reverse, Sort...)
heContnrs BSD3 yes | ... Collection of generic Free Pascal containers: BTree, lists, vectors.
Fundamentals BSD no | ... GitHub account contains 2 versions of library: 4 and 5.
RBS AntiDOT GPLv2 ?? | ... Library of containers and data structures for Pascal: Vectors, Maps, Sets, Lists and others.
LightContainers, GitHub mirror FPC no+yes | aasl Generic and non-generic variants. Quite low-level.
StringHashMap MPL1.0 ?? | ... Port of code from JCL.
GContnrs LGPLv2 + linking exception yes | v, hm, hs, ll, q, dq, s, ts, tm, bs Generic containers: doubly linked lists, dequeues, hash maps, hash sets, priority queues, queues, stacks, tree maps, tree sets, vectors and bitsets.
CL4fpc GPLv2 yes | ... Red-black tree, AVL tree, Decart tree, weight-balanced tree, hash-maps, FIFO, ResPool and others.
HAMT LGPLv2 + linking exception yes | tm, ts Immutable hash array mapped tree.
LGenerics Apache 2.0 yes | gr, s, q, dq, v, rb, av, hs, hm, tm, ts, ms, mm, bm, bs... Collection of generic algorithms and data structures for FPC and Lazarus.
PascalContainer BSD yes | rb, q, dq, hm, tm Generic data structure with B-Tree, B+Tree, B*Tree, T-Tree, HashMap, priority queue, red-black-Tree, AVL-tree, Quad-Tree, SkipList, LockFreeQueue.
code data type
al array list
as array set
rb red-black tree
av AVL tree
hm hashmap
hs hashset
ll linked list
q queue
dq deque
s stack
v vector
tm treemap
ts treeset
ms multiset
mm multimap
bm bijective map
bs bitset
gr graph
aasl "array of array of T" based sorted list.

See also


From the Free Pascal wiki, page "Data Structures, Containers, Collections", as it stood on 2022-03-12 after a change by Alextp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 3, last changed by WikiArchive .