Hi,
I've spotted a strange behaviour of Permutations.cardinality(): first it
reports a weird number, but after a call to list() it gets ok. Any reason
why?
I copy a code that compares the behaviour of Tuples, Permutations and
Arrangements.
%%%%%%%%%%%%%%%
from sage.combinat.permutation import *
from sage.combinat.tuple import *
ms=[1,1,1,2,2,2,3,3,3]
tms = Tuples(ms,3)
pms = Permutations_msetk(ms,3)
ams = Arrangements_msetk(ms,3)
print("ctms: " + str(tms.cardinality()))
print("cpms: " + str(pms.cardinality()))
print("cams: " + str(ams.cardinality()))
print("ltms: " + str(tms.list()))
print("lpms: " + str(pms.list()))
print("lams: " + str(ams.list()))
print("ctms: " + str(tms.cardinality()))
print("cpms: " + str(pms.cardinality()))
print("cams: " + str(ams.cardinality()))
%%%%%%%%%%%%%%%
Best,
Karol
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.