Skip to content

Gikoskos/libvoids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libvoids

A collection of data structures implemented in C. The data structures store data and keys that are of type pointer to void void*.

How to build

The build system is CMake.

To build the static library, create a new build folder in the root of the repository, and run

cmake ..

from inside that folder. For example on a Linux terminal:

mkdir build && cd build && cmake ..

on Windows cmd.exe:

mkdir build & cd build & cmake ..

If you'd like to build a DLL/so instead of a static library (which is the default):

cmake .. -DBUILD_SHARED_LIBS=ON

If you'd like to get MinGW makefiles instead of Visual Studio project files on Windows (which is the default):

cmake .. -G "MinGW Makefiles"

The Debug build builds all the tests together with the library, not separately, and the final binary has debugging symbols:

cmake .. -DCMAKE_BUILD_TYPE=Debug

How to use

Documentation

Data Structures

  • Singly linked list
  • Singly linked list with sentinel
  • Doubly linked list
  • Doubly linked list with sentinel
  • Circular singly linked list
  • Circular doubly linked list
  • Circular buffer (ring buffer)
  • FIFO
  • Stack
  • Double ended queue (dequeue)
  • Binary search tree (unbalanced)
  • AVL tree
  • Treap
  • Splay tree
  • Trie
  • (a,b) tree
  • Binary heap implemented as a binary tree
  • Binary heap implemented as an array
  • Binomial heap
  • Fibonacci heap
  • Height-biased Leftist heap
  • Skew heap
  • Red black tree
  • Association List
  • Hashing with chaining
  • Hashing with linear probing and optional rehashing
  • Hashing with quadratic probing and mandatory rehashing (in case load factor >= 0.5)

more to come...

Libs used

C99 standard library

xxHash for getting a hashcode out of data of arbitrary length (it's built as part of the library, not separately)

SIMD-oriented Fast Mersenne Twister for having randomly generated numbers on data structures that need them

LICENSE

lib\external\SFMT\LICENSE.txt for all files in the lib\external\SFMT directory

lib\external\xxHash\LICENSE for all files in the lib\external\xxHash directory

LICENSE.txt for all the other files

libvoids (c) 2016-2017 georgekoskerid@outlook.com

About

A big collection of data structures in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published