Groups
Groups
Sign in
Groups
Groups
sage-support
Conversations
Labels
About
Send feedback
Help
Do we have multiset?
117 views
Skip to first unread message
Kwankyu
unread,
Jun 25, 2011, 5:26:57 PM
6/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
Hi,
Do we have multiset in Sage or Python? I learned that Python 2.7 has Counter collection which implements multiset.
If not, is there a simple construct to mimic multiset?
Kwankyu
Rado
unread,
Jun 26, 2011, 1:04:25 AM
6/26/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
you can use dicts
multiset = {1: 1, 2: 4, 3: 9}
Kwankyu
unread,
Jun 26, 2011, 2:17:45 AM
6/26/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-s...@googlegroups.com
Hi,
Dicts do not have methods for multisets. I will wait for Python 2.7 in Sage.
Kwankyu
Reply all
Reply to author
Forward
0 new messages