@@ -1075,4 +1075,28 @@ end
10751075 @test all (iszero, diag (A,1 ))
10761076end
10771077
1078+ @testset " opnorms" begin
1079+ T = Tridiagonal ([1 ,2 ,3 ], [1 ,- 2 ,3 ,- 4 ], [1 ,2 ,3 ])
1080+
1081+ @test opnorm (T, 1 ) == opnorm (Matrix (T), 1 )
1082+ @test_skip opnorm (T, 2 ) ≈ opnorm (Matrix (T), 2 ) # currently missing
1083+ @test opnorm (T, Inf ) == opnorm (Matrix (T), Inf )
1084+
1085+ S = SymTridiagonal ([1 ,- 2 ,3 ,- 4 ], [1 ,2 ,3 ])
1086+
1087+ @test opnorm (S, 1 ) == opnorm (Matrix (S), 1 )
1088+ @test_skip opnorm (S, 2 ) ≈ opnorm (Matrix (S), 2 ) # currently missing
1089+ @test opnorm (S, Inf ) == opnorm (Matrix (S), Inf )
1090+
1091+ T = Tridiagonal (Int[], [- 5 ], Int[])
1092+ @test opnorm (T, 1 ) == opnorm (Matrix (T), 1 )
1093+ @test_skip opnorm (T, 2 ) ≈ opnorm (Matrix (T), 2 ) # currently missing
1094+ @test opnorm (T, Inf ) == opnorm (Matrix (T), Inf )
1095+
1096+ S = SymTridiagonal (T)
1097+ @test opnorm (S, 1 ) == opnorm (Matrix (S), 1 )
1098+ @test_skip opnorm (S, 2 ) ≈ opnorm (Matrix (S), 2 ) # currently missing
1099+ @test opnorm (S, Inf ) == opnorm (Matrix (S), Inf )
1100+ end
1101+
10781102end # module TestTridiagonal
0 commit comments