Loading repository data…
Loading repository data…
gpdaniels / repository
A collection of useful well-commented, self-contained, simple, and/or interesting C++ classes
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository is a collection of useful cross-platform, well-commented, self-contained, simple, and interesting C++ classes in the style of the standard template library.
The current classes are as described below:
| Group | Class | Description | :grey_question: |
|---|---|---|---|
| ai | ann | Artificial neural network using the backpropagation algorithm for training. | :heavy_check_mark: |
| ai | hmm | Hidden markov model using the Baum-Welch algorithm for training. | :heavy_check_mark: |
| algorithm | astar | Implementation of the astar algorithm used to solve pathfinding problems. | :heavy_check_mark: |
| algorithm | dijkstra | Implementation of Dijkstra's algorithm used to solve pathfinding problems. | :heavy_check_mark: |
| algorithm | gaussian_elimination | Linear simultaneous equation solver. | :heavy_check_mark: |
| algorithm | kmeans | Implementation of the KMeans clustering algorithm. | :heavy_check_mark: |
| algorithm | maxn | The MaxN search algorithm to find the best possible moves for an N player game with known information. |
| :construction: |
| algorithm | quicksort | Recursive quicksort algorithm, both full and partial versions. | :heavy_check_mark: |
| algorithm | satisfiability | A simple SAT solver. | :construction: |
| algorithm | simulation_loop | Fixed time step helper class for creating game loops. | :heavy_check_mark: |
| container | any | Class that can hold any variable type. | :heavy_check_mark: |
| container | array_nd | N-dimensional statically or dynamically sized array. | :heavy_check_mark: |
| container | lambda | Lambda function class that uses the heap for storage. | :heavy_check_mark: |
| container | ring_buffer | Dynamically sized thread-safe multi-producer multi-consumer ring-buffer. | :heavy_check_mark: |
| container | static_array_nd | N-dimensional statically sized array. | :heavy_check_mark: |
| container | static_lambda | Lambda function class that uses the stack for storage. | :heavy_check_mark: |
| container | static_ring_buffer | Statically sized thread-safe multi-producer multi-consumer ring-buffer. | :heavy_check_mark: |
| container | static_variant | A static_variant class that can contain any one of its listed template types. | :construction: |
| container | static_view | A non-owning static_view into multi-dimensional memory. | :construction: |
| crypto | aes | An implementation of the aes encryption algorithm for 128, 196, and 256 bits. | :heavy_check_mark: |
| crypto | block_cipher | An implementation of many block cipher modes to be used with block ciphers like aes<128>. | :heavy_check_mark: |
| crypto | chacha | An implementation of the chacha encryption algorithm. | :heavy_check_mark: |
| crypto | rc4 | An implementation of the rc4 or arc4 encryption algorithm. | :construction: |
| crypto | rsa | An implementation of the RSA (Rivest-Shamir-Adleman) asymmetric encryption algorithm. | :heavy_check_mark: |
| debug | access | Classes and macros for accessing class private members. | :heavy_check_mark: |
| debug | assert | Macros that define an assert macro that optionally takes a format string and parameters. | :heavy_check_mark: |
| debug | assume | Macro that hints to the compiler when a statement should be assumed true. | :heavy_check_mark: |
| debug | breakpoint | Macro for creating a breakpoint. | :heavy_check_mark: |
| debug | expect | Macro that hints to the compiler when a statement should be expected as true or false. | :construction: |
| debug | sentinel | A simple class to help detect stack overflows. | :construction: |
| debug | short_file | Replacement for the __FILE__ macro to prevent build path being leaked into the binary. | :heavy_check_mark: |
| debug | signal | Class to wrap signal handlers allowing the use of lambdas with scope. | :heavy_check_mark: |
| debug | unused | Macro for hiding unused variable warnings. | :heavy_check_mark: |
| execution | barrier | Thread syncronisation barrier. | :heavy_check_mark: |
| execution | coroutine | Setjump/Longjump implementation of stackful coroutines. | :heavy_check_mark: |
| execution | semaphore | Semaphore made using a mutex and condition variable. | :heavy_check_mark: |
| execution | spin_lock | Spin lock implemented using an atomic flag. | :heavy_check_mark: |
| execution | thread_pool | Multi-queue thread-pool that performs jobs in priority order. | :heavy_check_mark: |
| execution | triple_buffer | Lockless triple buffer interface to three buffers. | :heavy_check_mark: |
| file/archive | tar | Tar format archive reader and writer. | :construction: |
| file/text | json | A small json parser and composer. | :construction: |
| game | mastermind | An implementation of Donald Knuth's algorithm to solve the mastermind game in five moves or less. | :construction: |
| game | puzzle_cube | Solver for 3x3 puzzle cubes. | :construction: |
| game | sudoku | A sudoku solver for standard 9x9 grids. | :construction: |
| game | tic_tac_toe | Solver for the game tic-tac-toe on a 3x3 board. | :construction: |
| hash | crc | An implementation of the crc hashing function for 8, 16, 32, and 64 bits. | :heavy_check_mark: |
| hash | md5 | An implementation of the md5 hashing function. | :heavy_check_mark: |
| hash | sha0 | An implementation of the sha0 hashing function. | :heavy_check_mark: |
| hash | sha1 | An implementation of the sha1 hashing function. | :heavy_check_mark: |
| hash | sha2 | An implementation of the sha2 hashing function for 224, 256, 384, and 512 bits. | :heavy_check_mark: |
| hash | sha3 | An implementation of the sha3 hashing function for 224, 256, 384, and 512 bits. | :heavy_check_mark: |
| io | file | An RAII file handle that wraps file operation functions. | :construction: |
| io | paths | Collection of cross platform functions to provide useful paths. | :heavy_check_mark: |
| io | socket | Cross platform socket class, supporting tcp (server and client) and udp protocols. | :construction: |
| math | big_integer | Arbitrary sized signed integers. | :heavy_check_mark: |
| math | big_unsigned | Arbitrary sized unsigned integers. | :heavy_check_mark: |
| math | symbolic | Compile time symbolic differentiation using template metaprogramming. | :construction: |
| parser | generator | A parser generator to generate parsers defined using a collection of parsing primitives. | :heavy_check_mark: |
| parser | pl0 | A parser and interpreter for the PL/0 programming language. | :construction: |
| platform | architecture | Macros and helper function to get the architecture used for the build. | :heavy_check_mark: |
| platform | compiler | Macros and helper function to get the compiler used for the build. | :heavy_check_mark: |
| platform | cpu | Class to extract cpuid information to determine supported instructions at runtime. | :heavy_check_mark: |
| platform | operating_system | Macros and helper function to get the operating system used for the build. | :heavy_check_mark: |
| platform | runtime | Macros and helper function to get the runtime used for the build. | :heavy_check_mark: |
| platform | timestamp | Function to get a monotonically increasing timestamp. | :heavy_check_mark: |
| platform | types | Type aliases of standard types to short names. | :heavy_check_mark: |
| protection | virtual_machine | A simple stack based virtual machine allowing easy creation of custom operands. | :heavy_check_mark: |
| random | random_mt | Mersenne twister pseudo-random number generator. | :heavy_check_mark: |
| random | random_pcg | PCG pseudo-random number generator. | :heavy_check_mark: |
| random | random_rlcg | A reversible pseudo-random number generator. | :heavy_check_mark: |
| random | random_romu_32 | Romu 32 bit pseudo-random number generator. | :heavy_check_mark: |
| random | random_romu_64 | Romu 64 bit pseudo-random number generator. | :heavy_check_mark: |
| random | random_splitmix | Splitmix pseudo-random number generator. | :heavy_check_mark: |
| random | random_xorshift | Xorshift pseudo-random number generator. | :heavy_chec |