From: Janne H. <ja...@hy...> - 2004-12-19 11:34:40
|
> Looks like all intersect, unite, and friends have serious flaws. > They have been posted on this list by some people, and I added them without > checking. Next time I will ;) Yep, that's what I figured as well. But decided I will point my finger at only the ones that I have a tester ready :) I am not yet 100% sure, but it also seems that BitSet.compare is broken. According to the docs, it is not absolutely clear how the comparison should be interpreted, but to me a sensible compare would work the same way as forming a bignum of the bitset and comparing the bignums. Currently this does not appear to be the case. > The functions themselves are not designed correctly, I would like to change > them from : > > val intersect : t -> t -> unit > > to : > > val intersect : t -> t -> t > > which will produce a new bitset. Sounds more logical to me in Ocaml world. > Any volunteer for implementation ? Yes, this is one nitpick that I had in mind. Is it possible to just go and change the API on these? I also think that "union" would be a nicer name "unite" and "difference" (or "subtract") instead of "differentiate". In my mind differentiate associates to calculating derivatives. I might have a little time during the next couple of weeks. So if there's no hurry, perhaps I could volunteer for making these changes. ciao, janne |