Skip to content

Commit b891ab8

Browse files
authored
ul inv fixes (#44)
* ul inv fixes * qr approx lu * Update Project.toml * Use latest banded matrices
1 parent 4fae208 commit b891ab8

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

Project.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfiniteLinearAlgebra"
22
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
3-
version = "0.4.0"
3+
version = "0.4.1"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -16,19 +16,18 @@ MatrixFactorizations = "a3b82374-2e81-5b9e-98ce-41277c0e4c87"
1616
SemiseparableMatrices = "f8ebbe35-cbfb-4060-bf7f-b10e4670cf57"
1717

1818
[compat]
19-
ArrayLayouts = "0.4.3"
20-
BandedMatrices = "0.15.17"
19+
ArrayLayouts = "0.4.4"
20+
BandedMatrices = "0.15.19"
2121
BlockArrays = "0.12.12"
2222
BlockBandedMatrices = "0.9"
23-
FillArrays = "0.9.4"
23+
FillArrays = "0.9.5"
2424
InfiniteArrays = "0.8"
25-
LazyArrays = "0.17.3"
26-
LazyBandedMatrices = "0.3.1"
27-
MatrixFactorizations = "0.5.2"
28-
SemiseparableMatrices = "0.1.2"
25+
LazyArrays = "0.17.5"
26+
LazyBandedMatrices = "0.3.2"
27+
MatrixFactorizations = "0.6"
28+
SemiseparableMatrices = "0.1.3"
2929
julia = "1.5"
3030

31-
3231
[extras]
3332
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3433
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

src/infqr.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,4 +312,5 @@ ldiv!(F::QR{<:Any,<:AdaptiveQRFactors}, b::LayoutVector) = ldiv!(F.R, lmul!(F.Q'
312312
\(F::QR{<:Any,<:AdaptiveQRFactors}, B::LayoutVector) = ldiv!(F.R, F.Q'B)
313313

314314

315-
factorize(A::BandedMatrix{<:Any,<:Any,<:OneToInf}) = qr(A)
315+
factorize(A::BandedMatrix{<:Any,<:Any,<:OneToInf}) = qr(A)
316+
qr(A::SymTridiagonal{T,<:AbstractFill{T,1,Tuple{OneToInf{Int}}}}) where T = adaptiveqr(A)

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ end
110110
@test A*B isa MulMatrix
111111
@test B'A isa MulMatrix
112112

113+
@test all(diag(A[1:6,1:6]) .=== zeros(6))
114+
113115
@test (A*B)[1:7,1:5] A[1:7,1:6] * B[1:6,1:5]
114116
@test (B'A)[1:5,1:7] (B')[1:5,1:6] * A[1:6,1:7]
115117
end

test/test_infqr.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,12 @@ import SemiseparableMatrices: AlmostBandedLayout, VcatAlmostBandedLayout
259259
θ,φ = acos(x),acos(y)
260260
@test (sin.((1:100) .* φ)/sin(φ))' * InvDiagTrav(u[Block.(1:100)]) * sin.((1:100) .* θ)/sin(θ) 1/(2x+y-8)
261261
end
262+
263+
@testset "SymTridiagonal Toeplitz" begin
264+
Δ = SymTridiagonal(Fill(-2,∞), Fill(1,∞))
265+
h = 0.01
266+
A = I - h*Δ
267+
b = [1; 2; 3; zeros(∞)]
268+
@test (qr(A) \ b) (ul(A) \ b)
269+
end
262270
end

0 commit comments

Comments
 (0)