I am looking for a mature implementation of M-Tree Java. Or even ANY implementation of M-Tree (besides the only implementation I found)
http://en.wikipedia.org/wiki/M-tree
For those who have not heard of the M-tree (for example, 2 days ago), M-Tree is a search tree that can retrieve “n-nearest records” or “all records in distance d” when the keys it uses can be placed in a "metric space" (M stands for metric).
I found one online at: https://github.com/erdavila/M-Tree
This implementation is workable if necessary, but it is not Serializable, it does not provide a "contains ()" method, and currently it throws an assertion error (which I figured out how to fix).
If there is a slightly more polished implementation, I would like to know, because this data structure seems very useful, and I would like to find a canonical implementation.
--- Added more information (not to close this question) ---
My ultimate goal is a map in which the "public value get (Key)" method returns the "closest" value, even if there is no exact match of the keys. Because I use Keys that are defined above the metric space that I look at MTree to handle the "closest" part of this problem.
The implementation above will not work because (1) it fails when the same key is placed twice, (2) it will not allow me to delete the key, and (3) it will not allow me to check if the key has already been inserted .
source share