We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cfbd4e commit d1b6872Copy full SHA for d1b6872
src/youngdiagrams.jl
@@ -79,6 +79,7 @@ function leglength(ξ::SkewDiagram)
79
λ, μ = ξ
80
m, n = length(λ), length(μ)
81
#Construct matrix representation of diagram
82
+ if m==0 return -1 end
83
l = maximum(λ)
84
youngdiagram=zeros(Int, m, l)
85
for i=1:n
test/youngdiagrams.jl
@@ -2,12 +2,18 @@ using Combinatorics
2
using Base.Test
3
4
@test ([5,4,2,2]\[2,1]) == ([5, 4, 2, 2],[2, 1])
5
+
6
@test leglength([5,4,2,2], [2,1]) == leglength(([5, 4, 2, 2],[2, 1])) == 3
7
+@test leglength([1], [1]) == -1
8
+@test leglength(Int[], Int[]) == -1
9
10
@test isrimhook([4,3,2], [2,2,2])
11
@test !isrimhook([4,3,2], [2,2,1])
12
@test !isrimhook([4,3,2], [1,1])
-λ = [5,4,2,1]
-@test partitionsequence(λ) == [1, 0, 1, 0, 1, 1, 0, 1, 0]
-@test character(λ, [4,3,2,2,1]) == 0
13
14
+let λ = [5,4,2,1]
15
+ @test partitionsequence(λ) == [1, 0, 1, 0, 1, 1, 0, 1, 0]
16
+ @test character(λ, [4,3,2,2,1]) == 0
17
+end
18
@test character([1], [1]) == 1
19
0 commit comments