Completed
Details
Assignee
Michał MarczykMichał MarczykReporter
Pepijn de VosPepijn de VosPatch
Code and TestPriority
Minor
Details
Details
Assignee
Michał Marczyk
Michał MarczykReporter
Pepijn de Vos
Pepijn de VosPatch
Code and Test
Priority
Created January 6, 2014 at 12:22 PM
Updated August 23, 2016 at 7:22 PM
Resolved August 23, 2016 at 7:22 PM
This allows one to find the nearest matching key if no exact match is found.
I'm implementing a decaying history collection.
I started out with Clojures sorted-map, mapping from revision to value.
However, it turns out that I need a fast way to delete the nth element.
So your AVL tree saves the day.
Except, it would be really nice that if someone looked up an old revision that has been decayed, I could serve them the nearest one instead.
I think it's pretty easy to implement at least that part of it. Just the terminal case of the lookup fn needs to be adjusted. The submap part might be more involved.