From: Jann R. <roe...@et...> - 2009-07-07 14:35:56
|
Hi Daniel, I don't have a sample for all bugs. I will probably try to reproduce it again later, but for starters: * subtract does not reset the found_item, thus causing weird behavior in has_key. The has_key implementation seems strange anyway. Why do you use a class variable as iterator. Locals are faster and easier to understand. I think the search feature should set found_item to Void in the beginning. * subtract seems to remove the wrong node. It seems to remove the successor of the node that holds the item. In my code the postcondition is_disjoint fails. * After changing subtract to remove the node which contains the item, I got other weird contract violations (it claimed that l_node was not in the same tree) Jann Daniel Tuser schrieb: > Jann Röder wrote: >> Hi, >> I was wondering what the status of the DS_BINARY_SEARCH_TREE_* classes >> is. I was trying to use the DS_RED_BLACK_TREE_SET and found it to be >> quite buggy. I already spent several hours trying to fix the subtract >> feature. But fixing one bug always seems to uncover another one, which >> is quite frustrating. >> > Hi Jann > I am not aware of bugs in the implementation. All tests passed as far as > I know. If you send me a reproduction, I may have a look at the problem. >> Thanks, >> Jann |