This project has moved and is read-only. For the latest updates, please go here.
1

Resolved

RedBlackTree.cs

description

Hi,

I found a bug in the class RedBlackTree. On the line 422 in the method InOrderTraversal, there is
foreach (RedBlackTreeNode<TKey, TValue> leftNode in this.InOrderTraversal(node, from, to, fromOpen, toOpen))
instead of
foreach (RedBlackTreeNode<TKey, TValue> leftNode in this.InOrderTraversal(node.Left, from, to, fromOpen, toOpen))
The same mistake with node.Left repeates also in InOrderTraversalFrom and InOrderTraversalTo.

I'm going to play with this IMDB because the performace has been pretty good till now. Thank you :)

Best regards,
Michal Dvorak

comments

tamasflamich wrote Sep 10, 2013 at 11:02 AM

Hello,

Thank you for reporting this issue. Sorry for the late response, but somehow I did not receive an e-mail notification.

I will check this in the near future.

tamasflamich wrote Sep 14, 2013 at 11:00 PM

I fixed it, however these recursive iterator methods are very inefficient, so once the optimizer starts to utilize them, they will require a whole rethink/rewrite :)