File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ Aqua.test_all(NormalForms)
6464 @test Fr. U * M == Fr. H
6565 @test S. U * M * S. V == S. S
6666 end
67- @testset " SMatrix" begin
67+ @testset " Square SMatrix" begin
6868 M = SMatrix {3,3,Int} ([- 2 1 1 ; 2 - 1 1 ; 2 1 - 1 ])
6969 Fr = hnfr (M)
7070 Fc = hnfc (M)
@@ -74,6 +74,18 @@ Aqua.test_all(NormalForms)
7474 @test Fr. U * M == Fr. H
7575 @test S. U * M * S. V == S. S
7676 end
77+ @testset " Non-square SMatrix" begin
78+ M = SMatrix {2,3,Int} ([1 - 2 3 ; - 4 5 - 6 ])
79+ Fr = hnfr (M)
80+ Fc = hnfc (M)
81+ S = snf (M)
82+ @test hnfr! (collect (M)) == Fr
83+ @test hnfc! (collect (M)) == Fc
84+ @test snf! (collect (M)) == S
85+ @test M * Fc. U == Fc. H
86+ @test Fr. U * M == Fr. H
87+ @test S. U * M * S. V == S. S
88+ end
7789 @testset " Transposes" begin
7890 M = [- 2 1 1 ; 2 - 1 1 ; 2 1 - 1 ]
7991 Hrt = hnfr (transpose (M))
You can’t perform that action at this time.
0 commit comments