Feature #964
New function: MakeMultiset?
Status:
New
Priority:
Normal
Assignee:
Category:
CoCoA-5 function: new
Target version:
Description
Sometimes a function seeing a list as multiset (and counting the repeated elements) could be useful.
In practice something like this:
define MakeMultiset(L) return [ [X, count(L,X)] | X in MakeSet(L) ]; enddefine; -- MakeMultiset
Indeed this is not the standard way of writing a multiset
(e.g [8,8,8,9,7] --> [ [8,3], [9,1], [7,1] ])
so, how should this be called?
History
#1
Updated by John Abbott over 7 years ago
What applications do you have in mind?
In some ways it is not so different from a "factorization".
#2
Updated by Anna Maria Bigatti over 7 years ago
John Abbott wrote:
What applications do you have in mind?
I haven't yet replied because I cannot remember... I have used it as the line I wrote in the subject. I'll look for it, but it's not urgent.
Let's see if someone needs it again ;-)
In some ways it is not so different from a "factorization".
true
#3
Updated by Redmine Admin over 6 years ago
- Target version changed from CoCoA-5.2.2 to CoCoA-5.2.4
#4
Updated by John Abbott almost 6 years ago
- Target version changed from CoCoA-5.2.4 to CoCoA-5.?.?