2
2
# Young diagrams, partitions of unity and characters of the symmetric group Sn #
3
3
# ###############################################################################
4
4
5
- typealias partition Vector{Int64}
6
- typealias youngdiagram Array{Int64,2 }
7
- typealias skewdiagram (partition, partition )
5
+ typealias Partition Vector{Int64}
6
+ typealias YoungDiagram Array{Int64,2 }
7
+ typealias SkewDiagram (Partition, Partition )
8
8
9
- export partition ,
10
- youngdiagram , # represents shape of Young diagram
11
- skewdiagram , # skew diagrams
9
+ export Partition ,
10
+ YoungDiagram , # represents shape of Young diagram
11
+ SkewDiagram , # skew diagrams
12
12
partitionsequence,
13
13
isrimhook, # Check if skew diagram is rim hook
14
14
leglength,
@@ -21,16 +21,16 @@ import Base.\
21
21
# ################
22
22
23
23
# This uses a very simple internal representation for skew diagrams
24
- \ (λ:: partition , μ:: partition ) = Makeskewdiagram (λ, μ)
25
- function Makeskewdiagram (λ:: partition , μ:: partition )
24
+ \ (λ:: Partition , μ:: Partition ) = MakeSkewDiagram (λ, μ)
25
+ function MakeSkewDiagram (λ:: Partition , μ:: Partition )
26
26
m, n = length (λ), length (μ)
27
27
if n> m error (" Cannot construct skew diagram" ) end
28
28
(λ, μ)
29
29
end
30
30
31
31
# Checks if skew diagram is a rim hook
32
- isrimhook (λ:: partition , μ:: partition )= isrimhook (λ \ μ)
33
- function isrimhook (ξ:: skewdiagram )
32
+ isrimhook (λ:: Partition , μ:: Partition )= isrimhook (λ \ μ)
33
+ function isrimhook (ξ:: SkewDiagram )
34
34
λ, μ = ξ
35
35
m, n = length (λ), length (μ)
36
36
if n> m error (" Cannot construct skew diagram" ) end
74
74
75
75
76
76
# Strictly speaking, defined for rim hook only, but here we define it for all skew diagrams
77
- leglength (λ:: partition , μ:: partition )= leglength ((λ \ μ))
78
- function leglength (ξ:: skewdiagram )
77
+ leglength (λ:: Partition , μ:: Partition )= leglength ((λ \ μ))
78
+ function leglength (ξ:: SkewDiagram )
79
79
λ, μ = ξ
80
80
m, n = length (λ), length (μ)
81
81
# Construct matrix representation of diagram
99
99
# ######################
100
100
101
101
# Computes essential part of the partition sequence of lambda
102
- function partitionsequence (lambda:: partition )
102
+ function partitionsequence (lambda:: Partition )
103
103
Λ▔ = Int64[]
104
104
λ = [lambda; 0 ]
105
105
m = length (lambda)
@@ -121,7 +121,7 @@ isrimhook(a::Int64, b::Int64) = (a==1) && (b==0)
121
121
# ############################
122
122
123
123
# Computes recursively using the Murnaghan-Nakayama rule.
124
- function MN1inner (R:: Vector{Int64} , T:: Dict , μ:: partition , t:: Integer )
124
+ function MN1inner (R:: Vector{Int64} , T:: Dict , μ:: Partition , t:: Integer )
125
125
s= length (R)
126
126
χ:: Integer = 1
127
127
if t<= length (μ)
153
153
# "The computational complexity of rules for the character table of Sn",
154
154
# Journal of Symbolic Computation, vol. 37 iss. 6 (2004), pp 727-748.
155
155
# doi:10.1016/j.jsc.2003.11.001
156
- function character (λ:: partition , μ:: partition )
156
+ function character (λ:: Partition , μ:: Partition )
157
157
T = {()=> 0 } # Sparse array implemented as dict
158
158
Λ▔ = partitionsequence (λ)
159
159
MN1inner (Λ▔, T, μ, 1 )
0 commit comments