mdhondt / veb Goto Github PK
View Code? Open in Web Editor NEWVan Emde Boas tree - Java implementation
Van Emde Boas tree - Java implementation
Hello Mr. Dhondt,
Not an issue, but a "thank you" message...
I would like to congratulate you with your careful and very, very complete implementation of a Van Emde Boas tree. As the head of research at a Vienna, Austria startup, I was working on a prototype for a new feature in our server-side software, and I needed a vEB tree. I implemented the one given by Sedgewick, but introduced a bug into my code. Careful inspection of yours made me clear, within a brief time, where my bug was located. Nice work !
Best regards,
Jan van Oort
Head of research
Kivu Technologies GmbH, Vienna, Austria
Hi, I wanted to run some tests with a vEB Tree and I was testing with your code. I was trying to create a vEB with a universe size of 200 but it fails when trying to insert at offset 128. The getUniverse() method reports 200 but the insert of value 128 (always 128) fails with:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
I get this failure at line 794 inside the insert() method:
if (universeSize > 2)
if (clusters[high(key)].getMin() == NIL) {
I started my tests using a vEB Tree of size 16 (perfect square of 2^(2^2)) so I am wondering if the restriction that is talked about in the CLR book that there is no restriction on the universe size having to be an even square of 2 is not implement in your code? It looked like it was since you have the lower and upper square methods.
Thank you,
Ray
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.