@@ -8,7 +8,11 @@ b = rand(m)
88prob = LinearProblem (A, b)
99res = A \ b
1010@test solve (prob). u ≈ res
11+ @test ! LinearSolve. needs_square_A (QRFactorization ())
1112@test solve (prob, QRFactorization ()) ≈ res
13+ @test ! LinearSolve. needs_square_A (FastQRFactorization ())
14+ @test solve (prob, FastQRFactorization ()) ≈ res
15+ @test ! LinearSolve. needs_square_A (KrylovJL_LSMR ())
1216@test solve (prob, KrylovJL_LSMR ()) ≈ res
1317
1418A = sprand (m, n, 0.5 )
@@ -23,6 +27,7 @@ A = sprand(n, m, 0.5)
2327b = rand (n)
2428prob = LinearProblem (A, b)
2529res = Matrix (A) \ b
30+ @test ! LinearSolve. needs_square_A (KrylovJL_CRAIGMR ())
2631@test solve (prob, KrylovJL_CRAIGMR ()) ≈ res
2732
2833A = sprandn (1000 , 100 , 0.1 )
@@ -35,7 +40,9 @@ A = randn(1000, 100)
3540b = randn (1000 )
3641@test isapprox (solve (LinearProblem (A, b)). u, Symmetric (A' * A) \ (A' * b))
3742solve (LinearProblem (A, b)). u;
43+ @test ! LinearSolve. needs_square_A (NormalCholeskyFactorization ())
3844solve (LinearProblem (A, b), (LinearSolve. NormalCholeskyFactorization ())). u;
45+ @test ! LinearSolve. needs_square_A (NormalBunchKaufmanFactorization ())
3946solve (LinearProblem (A, b), (LinearSolve. NormalBunchKaufmanFactorization ())). u;
4047solve (LinearProblem (A, b),
4148 assumptions = (OperatorAssumptions (false ;
0 commit comments