TastyLib
C++ implementations of data structures, algorithms and useful designs.
Build Status
Linux  Windows  Coverage 

Outline
Data Structures
Name  Source  Benchmarked  Note  Definition 

DoublyLinkedList  Tests .h 
Yes  A linked data structure that consists of a set of sequentially linked records. It also supports merge sort.  Wikipedia 
BinaryHeap  Tests .h 
Yes  A heap data structure taking the form of a complete binary tree. A common way of implementing priority queue.  Wikipedia 
HashTable  Tests .h 
No  A data structure that stores unique elements in no particular order, and which allows for fast retrieval of individual elements based on their values. Similar to std::unordered_set.  Wikipedia 
AVLTree  Tests .h 
Yes  A selfbalancing binary search tree.  Wikipedia 
Graph  Tests .h 
No  A data structure to implement the directed/undirected graph concepts from mathematics. It stores a graph in an adjacency list or matrix.  Wikipedia 
Algorithms
Name  Source  Benchmarked  Note  Definition 

MD5  Tests .h 
Yes  A widely used hash function producing a 128bit hash value.  Wikipedia 
Sort  Tests .h 
Yes  Including insertion sort, selection sort, heap sort, quick sort, and quick select. For merge sort, please refer to DoublyLinkedList.sort().  Wikipedia 
Dijkstra  Tests .h 
No  An algorithm to find the shortest paths between vertices in a graph.  Wikipedia 
LCS  Tests .h 
No  A dynamic programming solution to find the longest subsequence or substring common to two sequences.  Wikipedia (substring) Wikipedia (subsequence) 
Designs
Name  Source  Benchmarked  Note  Reference 

NPuzzle  Tests .h 
Yes  A classic searching problem solved with A* search. [GUI]  Wikipedia 
TextQuery  Tests .h .cpp 
No  Search a given input stream for words. (OOP practice)  §12.3 & §15.9, C++ Primer, 5th Edition 
SharedPtr  Tests .h 
No  My own version of std::shared_ptr.  §12.1 & §16.1.6, C++ Primer, 5th Edition 
UniquePtr  Tests .h 
No  My own version of std::unique_ptr.  §12.1 & §16.1.6, C++ Primer, 5th Edition 
Calculator  Tests .h .cpp 
No  Infix arithmetic expression calculator based on recursive descent parser.  §4.2~4.4, Compilers: Principles, Techniques, and Tools, 2nd Edition 
Installation

Build with CMake:

Build benchmarks only
$ mkdir build $ cd build $ cmake ..

Build benchmarks and testss
$ mkdir build $ cd build $ git submodule init $ git submodule update $ cmake DTASTYLIB_BUILD_TEST=ON ..
You can customize the CMake Generators.


Build with GNU Make (assuming a Makefile generator was used):
$ make

All executables will be generated in the
bin
directory. Run all tests:$ ctest
License
See the LICENSE file for license rights and limitations.