Bailey Thompson e2ee62af08 Fix bug reported in Issue #16
Before this bug was fixed, it would result in a segmentation fault due to an off-by-one error in the trim function in the deque file. This off by one error was due to the fact that the end index points to the index after the last allocated block. However, in the trim function, the end index was treated as the last allocated block. Thus, in the case that the last block was completely full, the trim function would function as if there were another block after that block with one item in it. Thus, this block would be copied from without the memory being allocated.
2018-07-15 12:29:54 -07:00
2018-07-15 12:29:54 -07:00
2018-07-15 12:29:54 -07:00
2017-10-14 22:43:18 -04:00
2018-01-01 18:07:03 -05:00

Containers

This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.

Inspired by the C++ standard library. Implementation of the C++ standard library data structures using C; however, the data structures have different interfaces than those in the C++ standard library.

Sequence containers

Data structures which can be accessed sequentially.

array - static contiguous array

vector - dynamic contiguous array

deque - double-ended queue

forward_list - singly-linked list

list - doubly-linked list

Associative containers

Data structures that can be quickly searched which use comparators.

set - collection of unique keys, sorted by keys

map - collection of key-value pairs, sorted by keys, keys are unique

multiset - collection of keys, sorted by keys

multimap - collection of key-value pairs, sorted by keys

Unordered associative containers

Data structures that can be quickly searched which use hashing.

unordered_set - collection of unique keys, hashed by keys

unordered_map - collection of key-value pairs, hashed by keys, keys are unique

unordered_multiset - collection of keys, hashed by keys

unordered_multimap - collection of key-value pairs, hashed by keys

Container adaptors

Data structures which adapt other containers to enhance functionality.

stack - adapts a container to provide stack (last-in first-out)

queue - adapts a container to provide queue (first-in first-out)

priority_queue - adapts a container to provide priority queue

Description
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
Readme MIT 1.3 MiB
Languages
C 99.5%
Python 0.3%
Makefile 0.2%