[Haskell-cafe] ANN: signed-multiset-0.1

Sjoerd Visscher sjoerd at w3future.com
Thu Apr 26 01:14:55 CEST 2012


On Apr 26, 2012, at 12:54 AM, Stefan Holdermans wrote:

> Sjoerd,
> 
> I am sorry, as I already wrote, I decided to deprecate the package.

That's too bad, I really love these kind of data structures. (That's why I keep ranting about it, sorry about that.)

> 
>> [3] defines the union as h(u) = max(f(u), g(u)) where f, g and h are multiplicity functions.
> 
> Which is the same, as [3] is about multisets, not signed multisets.

Chapter 3 of [3] is about Hybrid Sets.

> 
>> [...] and this is also what your implementation does. (Map.unionWith max does not do a max if the key is not in one of the maps, i.e. if one of the multiplicities is 0.)
> 
> I am aware of that. Why are you explaining this?

Because we can't seem to get to an agreement. Usually this is because of a misunderstanding, so I try be as clear as possible, so you can understand my position, or point out my mistake.

> 
>> I think if your union would follow the definition with max as in [3] and [4] it is not confusing. But then empty would not be the identity of that union (that would be the signed multiset with multiplicity negative infinity for all elements), so it would still not be a good choice for the Monoid instance.
> 
> Let's agree to disagree. This is not constructive and, moreover, going nowhere.

I'd prefer to keep arguing actually. ;-) But if you have something better to do, I won't bother you anymore.

greetings,
Sjoerd

>>> [3] Apostolos Syropoulos: Mathematics of Multisets. WMP 2000: 347-358





More information about the Haskell-Cafe mailing list