Re: Binary search tree
Daniel Tuser <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <[email protected]> |
Eric Bezault wrote: > Hi Daniel, > > Is there a reason why `void_is_valid_key' is False > in DS_BINARY_SEARCH_TREE? For example in DS_HASH_TABLE > it is possible to have void keys. And the algorithms > seem to work with void anyway since `void_is_valid_key' > is True in DS_BINARY_SEARCH_TREE_SET. I think that it > would make the interface simplier if we could get rid > of this feature `void_is_valid_key'. I will have a closer look at it as I have more time next week. If it works in the void case too, you probably found an artifact I missed. > Apart from that, I still need to improve one thing and > then it will be ready to be committed in SVN. The > problem is with `equality_tester'. This is assumed to > be used in many places. Just look at the header comments > of `is_subset', `interset', etc. in DS_BINARY_SEARCH_TREE_SET. > But in fact it uses KL_COMPARATOR.order_equal. I'm currently > trying to use the KL_COMPARATOR as if it was a > KL_EQUALITY_TESTER of `equality_tester' (in other words > `comparator' and `equality_tester' would be the same > object). When the implementation started, it was actually just one object. I had to split it because some problems with void tests. It made the work easier. I didn't change it because it worked. But it is certainly cleaner, if there is just one such object. ------------------------------------------------------------------------- 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=/