Ask Your Question
0

how to print the weight multiplicites in a column

asked 2012-04-24 02:06:30 -0600

emiliocba gravatar image

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2012-04-24 03:54:23 -0600

achrzesz gravatar image

updated 2012-04-24 04:01:18 -0600

 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
edit flag offensive delete link more
1

answered 2012-04-24 03:46:13 -0600

achrzesz gravatar image
sage: for a in D2(1,0).weight_multiplicities().items(): print a   
....: 
((0, 1), 1)
((1, 0), 1)
((-1, 0), 1)
((0, -1), 1)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-04-24 02:06:30 -0600

Seen: 74 times

Last updated: Apr 24 '12