Cerpec is a personal project that aims to recreate popular data structures for the C programming language. These are divided based on their length into finite and 'infinite' (adjustable) structures.
C compiler that supports at least the C99 standard, for example:
CMake for proper build process.
- Either save it as a ZIP, then unzip it in your project
- or clone it locally:
# example:
git clone --recursive https://github.com/TheGAzed/cerpec.gitCMake code snipped showing how to add and link cerpec as a library:
set(CERPEC_TEST OFF)
add_subdirectory([path-to-folder]/cerpec)
# ...
target_link_libraries([target-name] PRIVATE cerpec)- STACK
- QUEUE
- DEQUE
- STRAIGHT LIST
- CIRCULAR LIST
- DOUBLE LIST
- HASH SET
- BITWISE SET
- RED-BLACK SET
- BINARY SEARCH TREE
- AVL TREE
- RED-BLACK TREE
- BINARY HEAP
- SEPARATE CHAINING HASH MAP
The cerpec library comes with a separately provided dodac library implementing some function pointer used in the data structures. These data types are: char, unsigned char, int, unsigned int, float, double, size_t, and string character pointers (char*).
Caution
String compare functions stringcmp and stringrcmp use strcmp under the hood - making null termination mandatory.
Caution
Floating point (float and double) data type comparisons may not be precise and epsilon-comparison isn't supported yet.