ternary_search_tree alternatives and similar shards
Based on the "Algorithms and Data structures" category.
Alternatively, view ternary_search_tree alternatives based on common mentions on social networks and blogs.
-
crystalline
A collection of containers & algorithms for the Crystal programming language -
fzy
A Crystal port of awesome Fzy project, a fuzzy finder algorithm. -
graphlb
graphlb is a crystal library which contains all the graph Data-Structures and Algorithms implemented in crystal-lang. -
markov
⛓ A Crystal library for building Markov Chains and running Markov Processes. -
blurhash.cr
A pure Crystal implementation of BlurHash algorithm -
kd_tree
Crystal implementation of "K-Dimensional Tree" and "N-Nearest Neighbors" -
text
A collection of phonetic algorithms for Crystal. Including; Porter-Stemmer, Soundex, Metaphone, Double Metaphone & White Similarity -
crystal-linked-list
Simple linked list implementation in Crystal -
Goban
A fast and efficient QR/Micro QR/rMQR Code implementation in Crystal lang -
haversine
Crystal implementation of the Haversine formula to calculate distances between two points given their latitudes and longitudes -
edits.cr
Edit distance algorithms inc. Jaro, Damerau-Levenshtein, and Optimal Alignment -
splay_tree_map
This is a Crystal implementation of a Splay Tree; which is a type of binary search tree that is semi-balanced and that tends to self-optimize so that the most accessed items are the fastest to retrieve. -
csuuid
This is a small UUID library that implements a chronologically sortable UUID. -
ksuid.cr
Crystal implementation of K-Sortable Globally Unique IDs -
delimiter_tree
A crystal-lang tree structure that is built using a delimiter. -
murmur3
Crystal implementation of Murmur3 hash algorithm used by Cassandra -
hash_ring
Implementation of Consistent Hash Ring for Crystal -
secure-remote-password
Crystal implementation of the Secure Remote Password protocol (SRP-6a) -
primes
Library for testing primality and factoring integers in Crystal -
s2_cells
maps latitude and longitude to S2 Cells https://s2geometry.io/
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of ternary_search_tree or a related project?
README
Ternary Search Tree - (pure crystal-lang)
In computer science, a ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two. Like other prefix trees, a ternary search tree can be used as an associative map structure with the ability for incremental string search. However, ternary search trees are more space efficient compared to standard prefix trees, at the cost of speed. Common applications for ternary search trees include spell-checking and auto-completion. (wikipedia)
Furthur considerations from Hackthology
Installation
Add this to your application's shard.yml
:
dependencies:
ternary_search:
github: johnjansen/ternary_search
Usage
require "ternary_search"
tst = TernarySearch::Tree.new
# add to the TST
tst.insert("polygon") # => nil
tst.insert("triangle") # => nil
# search the TST
tst.search("polygon") # => true
tst.search("poly") # => false
tst.search("triangle") # => true
# get the max word length
tst.max_word_length # => 8
# get an array of words in the TST
# DO NOT USE THIS ON LARGE TST's
# i'm looking into a block version of this!
tst.words = ["polygon", "triangle"]
Contributing
- Fork it ( https://github.com/johnjansen/ternary_search/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- johnjansen John Jansen - creator, maintainer
- RX14 Chris Hobbs - rewriter, maintainer