how to print the weight multiplicites in a column

i like this post (click again to cancel)
0
i dont like this post (click again to cancel)

I work with

D2=WeylCharacterRing("D2")

and I am interested in

D2(1,0).weight_multiplicities()
{(0, 1): 1, (1, 0): 1, (-1, 0): 1, (0, -1): 1}

I would like to have this result in a column. I tried as follows:

for a in D2(1,0).weight_multiplicities(): print a
(0, 1)
(1, 0)
(-1, 0)
(0, -1)

But now, I didn't have the multiplicities (the number after ":"). I would like to obtain

(0, 1): 1
(1, 0): 1
(-1, 0): 1
(0, -1):1

How can I do? Thanks.-.

asked Apr 24 '12

emiliocba gravatar image emiliocba flag of Argentina
31 5

2 Answers:

i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel) emiliocba has selected this answer as correct
 sage: d=D2(1,0).weight_multiplicities()                                 
 sage: for k in range(len(d)): print d.keys()[k],":",d.values()[k]
    ....: 
    (0, 1) : 1
    (1, 0) : 1
    (-1, 0): 1
    (0, -1): 1
link

posted Apr 24 '12

achrzesz gravatar image achrzesz
1661 4 16 36

updated Apr 24 '12

i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel)
sage: for a in D2(1,0).weight_multiplicities().items(): print a   
....: 
((0, 1), 1)
((1, 0), 1)
((-1, 0), 1)
((0, -1), 1)
link

posted Apr 24 '12

achrzesz gravatar image achrzesz
1661 4 16 36

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Apr 24 '12

Seen: 26 times

Last updated: Apr 24 '12

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.