@@ -348,14 +348,13 @@ end
348348 B = sbmatrix(W, T, Ub, wb, n)
349349 AM, BM = Matrix.((A,B))
350350 @test eigvals(A, B) ≈ eigvals(AM, BM)
351- if VERSION >= v"1.9"
352- Λ, V = eigen(A, B)
353- VM = Matrix(V)
354- Λ2, V2 = eigen(AM, BM)
355- @test Λ ≈ Λ2
356- @test VM' * AM * VM ≈ V2' * AM * V2
357- @test VM' * AM * VM ≈ VM' * BM * VM * Diagonal(Λ)
358- end
351+
352+ Λ, V = eigen(A, B)
353+ VM = Matrix(V)
354+ Λ2, V2 = eigen(AM, BM)
355+ @test Λ ≈ Λ2
356+ @test VM' * AM * VM ≈ V2' * AM * V2
357+ @test VM' * AM * VM ≈ VM' * BM * VM * Diagonal(Λ)
359358 end
360359end
361360
370369
371370 b = rand(T,size(A,1))
372371 @test Ac\b ≈ Matrix(A)\b
373- VERSION >= v"1.9-" && @test Ac\b ≈ A\b
372+ @test Ac\b ≈ A\b
374373 end
375374
376375 for T in (Float64, BigFloat)
383382
384383 b = rand(T,size(A,1))
385384 @test Ac\b ≈ Matrix(A)\b
386- VERSION >= v"1.9-" && @test Ac\b ≈ A\b
385+ @test Ac\b ≈ A\b
387386 end
388387
389388 let T = ComplexF64
396395
397396 b = rand(T,size(A,1))
398397 @test Ac\b ≈ Matrix(A)\b
399- VERSION >= v"1.9-" && @test Ac\b ≈ A\b
398+ @test Ac\b ≈ A\b
400399 end
401400
402401 B = BandedMatrix(1=>Float64[1:4;], 0=>Float64[1:5;], -1=>Float64[1:4;])
409408 B = BandedMatrix(Symmetric(L * L'));
410409 Bv = Symmetric(view(B, :, :))
411410 chol = cholesky(Bv)
412- if VERSION >= v" 1.7 "
413- @test MemoryLayout(chol.U) isa TriangularLayout{'U', 'N', typeof(MemoryLayout(B))}
414- @test MemoryLayout(chol.L) isa TriangularLayout{'L', 'N', typeof(MemoryLayout(B'))}
415- @test isbanded(chol.L)
416- end
411+ @test MemoryLayout(chol.U) isa TriangularLayout{'U', 'N', typeof(MemoryLayout(B))}
412+ @test MemoryLayout(chol.L) isa TriangularLayout{'L', 'N', typeof(MemoryLayout(B'))}
413+ @test isbanded(chol.L)
417414 @test isbanded(chol.U)
418415 cc = LinearAlgebra.cholcopy(Bv)
419416 @test cc isa Symmetric{Float64, typeof(B)}
464461 @test eltype(bandedmatrix) == eltype(matrix)
465462end
466463
464+ @testset " splitcholesky!" begin
465+ for T in (Float32, Float64, ComplexF32, ComplexF64)
466+ A = Hermitian(brand(T, 20, 20, 2, 4) + 10I)
467+ S = BandedMatrices.splitcholesky!(A)
468+ if T <: Real
469+ @test transpose(S) ≡ S'
470+ else
471+ @test_throws ArgumentError transpose(S)
472+ end
473+ end
474+ end
475+
467476end # module
0 commit comments