From 62690da3d1c74083f5f190e84582322413de2b1d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 12 Feb 2017 15:14:05 +0100 Subject: Remove page, category functionality as it is now provided by `tree.kummerlaender.eu` --- source/00_content/pages/projects/trie.md | 35 -------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 source/00_content/pages/projects/trie.md (limited to 'source/00_content/pages/projects/trie.md') diff --git a/source/00_content/pages/projects/trie.md b/source/00_content/pages/projects/trie.md deleted file mode 100644 index d0bddb2..0000000 --- a/source/00_content/pages/projects/trie.md +++ /dev/null @@ -1,35 +0,0 @@ -# Trie - -…is a basic template based implementation of a prefix tree data structure. - -The implementation may be found on [Github] or [cgit]. - -A prefix tree or _Trie_ is a data structure that can be used to store a dynamic set in a manner optimized for retrieving all keys with a specific prefix. While those keys are often plain character strings this template based implementation of the prefix tree data structure allows for usage with different types. - -## Current features - -* Specializable tree element type -* Adding, removing and resolving paths in the prefix tree -* Builds on the standard library -* Unit tests based on GoogleTest - -## Usage example - -The following example demonstrates the usage of the `Trie` class template specialized on a key and value type. While the first is obviously required the second may be ommitted if not required. Further usage examples are available as Google-Test based [test cases]. - -```cpp -Trie trie; - -trie.add({1, 1, 1, 1}, 42); -trie.add({1, 2, 1, 2}, 43); -trie.add({2, 3, 4, 5}, 44); -trie.add({2, 3, 1, 2}, 45); - -std::cout << trie.get({1, 1, 1, 1}) << std::endl; // true -std::cout << trie.get({1, 1, 1, 1}).get() << std::endl; // 42 -std::cout << trie.get({1, 2}) << std::endl; // false -``` - -[Github]: https://github.com/KnairdA/Trie -[cgit]: http://code.kummerlaender.eu/Trie/ -[test cases]: https://github.com/KnairdA/Trie/blob/master/test.cc -- cgit v1.2.3