rdaum / rart-rs Goto Github PK
View Code? Open in Web Editor NEWAn Adaptive Radix Tree implementation.
License: Apache License 2.0
An Adaptive Radix Tree implementation.
License: Apache License 2.0
The Self-Tuning Adaptive Radix Tree paper (https://db.in.tum.de/~leis/papers/artsync.pdf) adds some new concepts, which I might attempt to add to the existing implementation.
I want to look into see how much of this can be pulled into this existing implementation.
C++ implementation here for reference: https://github.com/jungmair/START
Problems with the current range & iteration implementation:
Thanks for the work on this project!
I see a couple of instances where unwrap can be removed and replaced with only ?
. As a general advice, unwrap can often be avoided and it is usually preferable to do so as a stylistic thing.
Two examples:
pub fn get<K: Key>(&self, key: &K) -> Option<&V> {
self.root.as_ref()?;
let root = self.root.as_ref().unwrap();
AdaptiveRadixTree::get_iterate(root, key)
}
Could be written as
pub fn get<K: Key>(&self, key: &K) -> Option<&V> {
AdaptiveRadixTree::get_iterate(self.root.as_ref()?, key)
}
let next_node = cur_node.seek_child(k);
next_node?;
depth += cur_node.prefix.length();
cur_node = next_node.unwrap();
Could be written as
depth += cur_node.prefix.length()
cur_node = cur_node.seek_child(k)?;
Inner nodes that have shrunk down to only 1 child which is a leaf should be pruned out, their prefix modified, and replaced with a leaf node.
Before I publish to crates.io, I need to write all the rustdoc and generally improve the comments thrroughout.
Once that is done, publish a version to crates.io
Thanks for this excellent librarry!
I noticed that the iter and range methods don't work currently because only the leaf nodes are being iterated over, and not the inner nodes. Just curious if you plan to resolve this
As per the https://db.in.tum.de/~leis/papers/artsync.pdf paper, implement a form of the tree using optimistic lock coupling.
I started down this path at one point but never finished. I have a draft of a versioned, coupled lock implemented elsewhere, but it's relatively untested and I will need to return to it.
I go back and forth on how much existing code can be shared.
Testing for correctness is perhaps the most challenging part here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.