Project

General

Profile

Feature #964

New function: MakeMultiset?

Added by Anna Maria Bigatti over 7 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Category:
CoCoA-5 function: new
Target version:
Start date:
08 Nov 2016
Due date:
% Done:

0%

Estimated time:
2.00 h
Spent time:

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.?.?

Also available in: Atom PDF