-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The RBT example in the tree is broken #15
Comments
Also, the final assertion fails, it's probably the same issue. |
I had forgotten (in fact accidentally removed in my refactorization-frenziness) some part of the balancedness check on RBTs, which I just restored in master. With that additional check, you can verify that this part of the balance function is necessary: comment it out, and you'll find counter-examples against balancedness. One issue with the current implementation is that while we can retrieve the counter-examples, we do not see how they were constructed. It's nice to get an unbalanced RBT as output (it tells us that we got something wrong), it would be even nicer to see that it is in fact You are right about the final assertion, I noticed it this morning, but it is a separate issue: to get something to fail when I added zipper, I added those I think this assertion would not fail if I removed those two functions, but I've been working on something else in a branch I hope to push this afternoon. In the meantime, feel free to disable the test, remove those functions, or just ignore the failure. |
I'd rather put on hold the whole thing about RBTs until we can all chat ~ jonathan On Sun 09 Feb 2014 03:21:49 PM CET, gasche wrote:
|
I finally disabled PS: yeah, let's discuss it tomorrow. |
Hey, this is still broken: if we add an element that is already present, we add it in the left tree. I realized that when I debugged my graph-based branch, but I did not fix the existing implementation... |
→ balance is called with its left child balanced, so
matching on a left child that is not balanced makes no sense.
(We'll talk about it on Monday and settle the thing about RBTs).
The text was updated successfully, but these errors were encountered: