Re: Binary search tree

Daniel Tuser <[email protected]> Wed, 06 Aug 2008 00:17:29 +0200
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
Hi Eric,

I was very busy during the last weeks. As soon as I find some time, I 
will have a look at the classes once again to make some more 
improvements, as the one you mentioned.

Regards,
Daniel

Eric Bezault wrote:
> Hi Daniel,
>
> Your binary search tree classes are now committed to SVN in
> the SourceForge Gobo project. As agreed, I made some name
> changes and some header comments and reformatting to better
> match Gobo's style guildelines. I also removed the unnecessary
> `void_is_valid_key' and merged `equality_tester' with `comparator'.
> I probably did some other minor changes, such as making sure
> that "key" features are not exported in the set classes
> (set classes don't have the notion of keys in their interface).
>
> I didn't review the binary search tree algorithms. But I think
> that some improvements can be made. For example, would it be
> possible to redefine `cursor_search_forth' and `cursor_search_back'
> in DS_BINARY_SEARCH_TREE_SET, to take advantage that the items
> are sorted, and hence avoid linear traversal?
>
> Also, I think that `internal_put' and `internal_put_new' deserve
> some postconditions that should match those of DS_SET and DS_TABLE
> so that when they are used to implement the corresponding features
> in set and table variants the code is correct in terms of DbC.
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/