GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bkthomps/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.

BranchesTags
Open more actions menu

Latest commit

 

History

169 Commits
169 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
tst
tst
 
 
.codecov.yml
.codecov.yml
 
 
.codedocs
.codedocs
 
 
.gitignore
.gitignore
 
 
Doxyfile
Doxyfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
compile_headers.py
compile_headers.py
 
 
containers.h
containers.h
 
 
documentation.md
documentation.md
 
 

Repository files navigation

GitHubBuild Documentation Codecov Language License

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; however, implemented using C with different function interfaces as the C++ standard library but with the same container names.

Setup

It is possible to compile this library as either static .a or dynamic .so:

  1. A static library is slightly faster than a dynamic one, however, if the library is modified, the entire project codebase which uses it will need to be relinked.
  2. A dynamic library can be changed without relinking the codebase, assuming no function definitions have changed.

The installation process is as follows:

  1. Clone this repository and navigate to it.
  2. Run make static_clang/make static_gcc or make dynamic_clang/make dynamic_gcc for either a static or dynamic library.
  3. Then, you can copy-paste containers.h and containers.a/containers.so into your project to include the containers.
  4. Finally, you remember to link the library by including containers.a -ldl/containers.so -ldl as an argument.

Documentation

For high-level documentation and usage, visit the documentation page. For in-depth documentation, visit the code docs page.

Container Types

The container types that this library contains are described below.

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

About

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.

Topics

arrayavl-treecollectioncollectionscontainercontainersdata-structuresdatastructuresdequehash-maphash-setlistmappriority-queuequeuesetstacktreetree-structurevector

Resources

Readme
MIT license
Activity

Stars

176 stars

Watchers

5 watching

Forks

16 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.