[1]:
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

import sympy as sp
import numpy as np
import itertools as it
import pysymmpol as sy
import pysymmpol.utils as ut
from IPython.display import display, Latex

Class: ConjugacyClass

We initialize the ConjugacyClass class with ConjugacyClass(conjugacy_class: dict). In order to avoind confusion with the YoungDiagram case, we enter a dictionary to be more explicit about what we are defining.

Otherwise, we would face problems like this: Consider the partition (3,2,1). Its conjugacy class vector is (1:1 ,2:1 ,3:1). If we omit the keys, one could interprets it as the partition (1,1,1). In fact, the partition (1,1,1) is represented as the conjugacy class (1:3), and the conjugacy class (3,2,1) is the partition (3,2,2,1,1,1). So, in order to avoid this type of problem, we represent the conjugacy classes as explicitly as possible, and the best way to accomplish this is with dictionaries.

[8]:
# An effective way to initialize the class in the correct form
vector1 = dict(enumerate((1,3,2,1),1))
[9]:
conjugacy_class = sy.ConjugacyClass(vector1)
[10]:
list(vector1.keys())
[10]:
[1, 2, 3, 4]

Getters and methods of the young diagram class are also available.

[11]:
conjugacy_class.columns
[11]:
4
[12]:
conjugacy_class.rows
[12]:
7
[13]:
conjugacy_class.conjugacy # This one is different, it gives the conjugacy class we are considering
[13]:
(1, 3, 2, 1)
[14]:
conjugacy_class.boxes
[14]:
17
[17]:
conjugacy_class.draw_diagram(3)
🎯
🎯 🎯
🎯 🎯
🎯 🎯
🎯 🎯 🎯
🎯 🎯 🎯
🎯 🎯 🎯 🎯
[18]:
conjugacy_class.conjugacy_partition() # This one translates this cycle into a partition notation
[18]:
(4, 3, 3, 2, 2, 2, 1)
[ ]: