kd_tree alternatives and similar shards
Based on the "Algorithms and Data structures" category.
Alternatively, view kd_tree alternatives based on common mentions on social networks and blogs.

crystalline
A collection of containers & algorithms for the Crystal programming language 
graphlb
graphlb is a crystal library which contains all the graph DataStructures and Algorithms implemented in crystallang. 
Goban
A fast and efficient QR/Micro QR/rMQR Code implementation in Crystal lang 
markov
⛓ A Crystal library for building Markov Chains and running Markov Processes. 
crystallinkedlist
Simple linked list implementation in Crystal 
text
A collection of phonetic algorithms for Crystal. Including; PorterStemmer, Soundex, Metaphone, Double Metaphone & White Similarity 
splay_tree_map
This is a Crystal implementation of a Splay Tree; which is a type of binary search tree that is semibalanced and that tends to selfoptimize so that the most accessed items are the fastest to retrieve. 
delimiter_tree
A crystallang tree structure that is built using a delimiter. 
haversine
Crystal implementation of the Haversine formula to calculate distances between two points given their latitudes and longitudes 
murmur3
Crystal implementation of Murmur3 hash algorithm used by Cassandra 
csuuid
This is a small UUID library that implements a chronologically sortable UUID. 
edits.cr
Edit distance algorithms inc. Jaro, DamerauLevenshtein, and Optimal Alignment 
ternary_search_tree
A Crystal implementation of a Ternary Search Tree 
secureremotepassword
Crystal implementation of the Secure Remote Password protocol (SRP6a) 
HKDF
HMACbased ExtractandExpand Key Derivation Function (HKDF) for crystal lang 
SPAKE2+
a crystal lang implementation of SPAKE2+, a Password Authenticated Key Exchange (PAKE) protocol 
named_information
A crystal lang implementation of rfc6920 (Naming Things with Hashes) 
verhoeff
implementation of the Verhoeff checksum algorithm in crystal lang
WorkOS  The modern identity platform for B2B SaaS
Do you think we are missing an alternative of kd_tree or a related project?
Popular Comparisons
README
Kd::Tree
Crystal implementation of "KDimensional Tree" and "NNearest Neighbors" based on http://en.wikipedia.org/wiki/Kdtree.
Installation
Add this to your application's shard.yml
:
dependencies:
kd_tree:
github: geocrystal/kd_tree
Usage
require "kd_tree"
Construct a new tree. Each point should be of the form [x, y]
, where x
and y
are numbers(Int32
, Float64
, etc):
kd = Kd::Tree(Int32).new(points)
Find the nearest point to [x, y]
. Returns an array with one point:
kd.nearest([x, y])
Find the nearest k
points to [x, y]
. Returns an array of points:
kd.nearest([x, y], k)
Example
require "kd_tree"
points = [
[2.0, 3.0],
[5.0, 4.0],
[4.0, 7.0],
[7.0, 2.0],
[8.0, 1.0],
[9.0, 6.0],
]
kd = Kd::Tree(Float64).new(points)
kd.nearest([1.0, 1.0])
# => [[2.0, 3.0]])
kd_tree.nearest([1.0, 1.0], 2)
# => [[2.0, 3.0], [5.0, 4.0]])
Performance
Using a tree with 1 million points [x, y] of Float64
on my i78550U CPU @ 1.80GHz:
build(init) ~10 seconds
nearest point 00.000278579
nearest point 5 00.000693038
nearest point 50 00.007207470
nearest point 255 00.134533902
nearest point 999 08.510465131
Contributing
 Fork it (https://github.com/geocrystal/kd_tree/fork)
 Create your feature branch (
git checkout b mynewfeature
)  Commit your changes (
git commit am 'Add some feature'
)  Push to the branch (
git push origin mynewfeature
)  Create a new Pull Request
Contributors
 mamantoha Anton Maminov  creator, maintainer
*Note that all licence references and agreements mentioned in the kd_tree README section above
are relevant to that project's source code only.