Of those operators, I think +, | and & make the most sense. If you think about the multisets as mappings with integer values, they are simply addition, max and min of corresponding values. ^ and - are a lot more questionable.
/ Niels Möller ()
Previous text:
2003-02-06 12:34: Subject: Xor
That's what I thought too, but I don't know if we have that, since there currently is no way to look up the "value".
Only when looping over multisets you can see that they are a multiset,
| > v=(<1,1,1,2,2,3>); | > foreach (v;int i;) werror("%d\n",i); | 1 | 1 | 1 | 2 | 2 | 3
as far as I can see. Using the index operator, it's not very multi.
And +, -, |, & and ^ doesn't all give that logical results:
(<1,1,1,2,2,3>)+(<1,3>) gives (<1,1,1,1,2,2,3,3>), (<1,1,1,2,2,3>)-(<1,3>) gives (<2,2>), (<1,1,1,2,2,3>)|(<1,3>) gives (<1,1,1,2,2,3>), (<1,1,1,2,2,3>)&(<1,3>) gives (<1,3>), (<1,1,1,2,2,3>)^(<1,3>) gives (<1,1,2,2>)
/ Mirar