From dae8a58c075034ef786dfd752fe7b317cae12150 Mon Sep 17 00:00:00 2001 From: Felix Gerick Date: Tue, 28 Jul 2020 11:45:26 +0200 Subject: [PATCH 1/7] start support for arbitrary precision numbers --- .travis.yml | 4 ++-- Manifest.toml | 19 +++++++++++++++++-- Project.toml | 3 ++- src/expansion.jl | 13 ++++++------- test/collect_eigen.jl | 4 ++-- test/runtests.jl | 21 +++++++++++---------- test/schur_to_eigen.jl | 9 +++++---- 7 files changed, 45 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index e906751..524ba4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ language: julia os: - linux julia: - - 0.7 + - 1.4 notifications: email: false after_success: - julia -e 'using Pkg; Pkg.add(["Documenter", "Coverage"])' - julia -e 'using Pkg, Coverage, ArnoldiMethod; cd(joinpath(dirname(pathof(ArnoldiMethod)), "..")); Codecov.submit(process_folder())' - - julia -e 'using Pkg, ArnoldiMethod; cd(joinpath(dirname(pathof(ArnoldiMethod)), "..")); include(joinpath("docs", "make.jl"))' \ No newline at end of file + - julia -e 'using Pkg, ArnoldiMethod; cd(joinpath(dirname(pathof(ArnoldiMethod)), "..")); include(joinpath("docs", "make.jl"))' diff --git a/Manifest.toml b/Manifest.toml index 62232aa..cf271e1 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,12 +1,20 @@ +# This file is machine-generated - editing it directly is not advised + [[Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[Distributed]] -deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"] +deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +[[GenericSchur]] +deps = ["LinearAlgebra", "Printf"] +git-tree-sha1 = "43b4dc5648028be2c6e96201aa3653903bd1af21" +uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" +version = "0.4.0" + [[InteractiveUtils]] -deps = ["LinearAlgebra", "Markdown"] +deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[Libdl]] @@ -23,6 +31,10 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + [[Random]] deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" @@ -50,3 +62,6 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[Test]] deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" diff --git a/Project.toml b/Project.toml index e6ab300..e2f1dfc 100644 --- a/Project.toml +++ b/Project.toml @@ -9,8 +9,9 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [extras] +GenericSchur = "c145ed77-6b09-5dd9-b285-bf645a82121e" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "SparseArrays"] +test = ["Test", "SparseArrays","GenericSchur"] diff --git a/src/expansion.jl b/src/expansion.jl index 02afd37..cd7baea 100644 --- a/src/expansion.jl +++ b/src/expansion.jl @@ -1,6 +1,5 @@ using Random using LinearAlgebra -using LinearAlgebra.BLAS: gemv! """ reinitialize!(a::Arnoldi, j::Int = 0) → a @@ -32,7 +31,7 @@ function reinitialize!(arnoldi::Arnoldi{T}, j::Int = 0) where {T} # Orthogonalize: h = Vprev' * v, v ← v - Vprev * Vprev' * v = v - Vprev * h h = Vprev' * v - gemv!('N', -one(T), Vprev, h, one(T), v) + mul!(v,Vprev,h,-one(T),one(T)) # Norm after orthogonalization wnorm = norm(v) @@ -41,7 +40,7 @@ function reinitialize!(arnoldi::Arnoldi{T}, j::Int = 0) where {T} if wnorm < η * rnorm rnorm = wnorm mul!(h, Vprev', v) - gemv!('N', -one(T), Vprev, h, one(T), v) + mul!(v,Vprev,h,-one(T),one(T)) wnorm = norm(v) end @@ -79,7 +78,7 @@ function orthogonalize!(arnoldi::Arnoldi{T}, j::Integer) where {T} # Orthogonalize: h = Vprev' * v, v ← v - Vprev * Vprev' * v = v - Vprev * h mul!(h, Vprev', v) - gemv!('N', -one(T), Vprev, h, one(T), v) + mul!(v,Vprev,h,-one(T),one(T)) # Norm after orthogonalization wnorm = norm(v) @@ -88,7 +87,7 @@ function orthogonalize!(arnoldi::Arnoldi{T}, j::Integer) where {T} if wnorm < η * rnorm rnorm = wnorm correction = Vprev' * v - gemv!('N', -one(T), Vprev, correction, one(T), v) + mul!(v,Vprev,correction,-one(T),one(T)) h .+= correction wnorm = norm(v) end @@ -112,7 +111,7 @@ Perform Arnoldi from `from` to `to`. """ function iterate_arnoldi!(A, arnoldi::Arnoldi{T}, range::UnitRange{Int}) where {T} V, H = arnoldi.V, arnoldi.H - + for j = range # Generate a new column of the Krylov subspace mul!(view(V, :, j+1), A, view(V, :,j)) @@ -127,4 +126,4 @@ function iterate_arnoldi!(A, arnoldi::Arnoldi{T}, range::UnitRange{Int}) where { end return arnoldi -end \ No newline at end of file +end diff --git a/test/collect_eigen.jl b/test/collect_eigen.jl index 28ce0c7..384ebbb 100644 --- a/test/collect_eigen.jl +++ b/test/collect_eigen.jl @@ -38,7 +38,7 @@ rot(θ) = [cos(θ) sin(θ); -sin(θ) cos(θ)] R = triu(rand(n, n)) R[1:2,1:2] .= rot(1.0) + I R[10:11,10:11] .= rot(1.2) + 2I - + # Compute exact eigenvectors according to LAPACK λs, xs = eigen(R) @@ -63,4 +63,4 @@ end θs = copy_eigenvalues!(rand(ComplexF64, length(range)), R, range) @test sort!(λs, by = reim) ≈ sort!(θs, by = reim) end -end \ No newline at end of file +end diff --git a/test/runtests.jl b/test/runtests.jl index 53b2723..143a882 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,16 +2,17 @@ using Test using LinearAlgebra using SparseArrays using Random +using GenericSchur -include("expansion.jl") -include("givens_rotation.jl") -include("ordering.jl") - -include("schurfact.jl") -include("sylvester.jl") -include("sort_schur.jl") -include("collect_eigen.jl") - -include("partial_schur.jl") +# include("expansion.jl") +# include("givens_rotation.jl") +# include("ordering.jl") +# # +# include("schurfact.jl") +# include("sylvester.jl") +# include("sort_schur.jl") +# # include("collect_eigen.jl") +# +# include("partial_schur.jl") # include("locked_restart.jl") include("schur_to_eigen.jl") diff --git a/test/schur_to_eigen.jl b/test/schur_to_eigen.jl index 7fd56c1..d2e5b95 100644 --- a/test/schur_to_eigen.jl +++ b/test/schur_to_eigen.jl @@ -2,11 +2,12 @@ using Test using LinearAlgebra, SparseArrays using ArnoldiMethod: partialschur, partialeigen using Random +using GenericSchur -@testset "Schur to eigen $T take $i" for T in (Float64,ComplexF64), i in 1:10 +@testset "Schur to eigen $T take $i" for T in (Float64,ComplexF64,BigFloat,Complex{BigFloat}), i in 1:10 Random.seed!(i) - A = spdiagm(0 => 1:100) + sprand(100, 100, 0.01) - ε = 1e-7 + A = spdiagm(0 => 1:100) + sprand(T,100, 100, 0.01) + ε = sqrt(eps(real(T))) minim, maxim = 10, 20 decomp, history = partialschur(A, nev=minim, tol=ε, restarts=200) @@ -18,4 +19,4 @@ using Random for i = 1 : minim @test norm(A * vecs[:,i] - vecs[:,i] * vals[i]) < ε * abs(vals[i]) end -end \ No newline at end of file +end From 9000fdf1691cb2872d9054a68b0926e07ef7fa47 Mon Sep 17 00:00:00 2001 From: fgerick Date: Wed, 17 Feb 2021 13:56:15 +0100 Subject: [PATCH 2/7] bigfloat with tests --- src/schursort.jl | 14 ++- test/collect_eigen.jl | 54 ++++---- test/expansion.jl | 64 +++++----- test/givens_rotation.jl | 8 +- test/partial_schur.jl | 21 ++-- test/runtests.jl | 20 +-- test/schurfact.jl | 187 ++++++++++++++-------------- test/sort_schur.jl | 269 +++++++++++++++++++++------------------- 8 files changed, 339 insertions(+), 298 deletions(-) diff --git a/src/schursort.jl b/src/schursort.jl index 6c9eb8d..dfd57ad 100644 --- a/src/schursort.jl +++ b/src/schursort.jl @@ -74,9 +74,13 @@ Computes the LU factorization of A using complete pivoting. """ function lu(A::SMatrix{N,N,T}, ::Type{CompletePivoting}) where {N,T} # A, p and q should allocate, but escape analysis will eliminate this! - A = MMatrix(A) - p = @MVector fill(N, N) + if isbitstype(T) + A = MMatrix(A) + else + A = SizedMatrix(A) + end q = @MVector fill(N, N) + p = @MVector fill(N, N) singular = false # Maybe I should consider doing this recursively. @@ -132,7 +136,11 @@ function lu(A::SMatrix{N,N,T}, ::Type{CompletePivoting}) where {N,T} end function (\)(LU::CompletelyPivotedLU{T,N}, b::SVector{N}) where {T,N} - x = MVector(b) + if isbitstype(T) + x = MVector(b) + else + x = SizedVector(b) + end # x ← L \ (P * b) for i = OneTo(N) diff --git a/test/collect_eigen.jl b/test/collect_eigen.jl index 384ebbb..abb69c6 100644 --- a/test/collect_eigen.jl +++ b/test/collect_eigen.jl @@ -7,13 +7,17 @@ using LinearAlgebra n = 20 # Exactly upper triangular matrix R - for T in (Float64, ComplexF64) + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) # Upper triangular matrix R = triu(rand(T, n, n)) # Compute exact eigenvectors according to LAPACK - λs, xs = eigen(R) + if VERSION >= v"1.2.0-DEV.275" + λs, xs = eigen(R, sortby=nothing) + else + λs, xs = eigen(R) + end # Allocate a complex-valued eigenvector x = zeros(complex(T), n) @@ -34,33 +38,41 @@ rot(θ) = [cos(θ) sin(θ); -sin(θ) cos(θ)] @testset "Eigenvectors quasi-upper triangular matrix" begin # Real arithmetic with conjugate eigvals -- quasi-upper triangular R - n = 20 - R = triu(rand(n, n)) - R[1:2,1:2] .= rot(1.0) + I - R[10:11,10:11] .= rot(1.2) + 2I + for T in (Float64, BigFloat) + n = 20 + R = triu(rand(T, n, n)) + R[1:2,1:2] .= rot(one(T)) + I + R[10:11,10:11] .= rot(T(6//5)) + 2I - # Compute exact eigenvectors according to LAPACK - λs, xs = eigen(R) + # Compute exact eigenvectors according to LAPACK + if VERSION >= v"1.2.0-DEV.275" + λs, xs = eigen(R, sortby=nothing) + else + λs, xs = eigen(R) + end - # Allocate a complex-valued eigenvector - x = zeros(ComplexF64, n) + # Allocate a complex-valued eigenvector + x = zeros(Complex{T}, n) - for i = 1:n - fill!(x, 0.0) - collect_eigen!(x, R, i) + for i = 1:n + fill!(x, 0) + collect_eigen!(x, R, i) - @test norm(x) ≈ 1 - @test abs.(x) ≈ abs.(xs[:, i]) + @test norm(x) ≈ 1 + @test abs.(x) ≈ abs.(xs[:, i]) + end end end @testset "Extract partial" begin n = 20 - R = triu(rand(n, n)) - R[1:2,1:2] .= rot(1.0) + I - for range = (1:3, 1:4) - λs = eigvals(R[range, range]) - θs = copy_eigenvalues!(rand(ComplexF64, length(range)), R, range) - @test sort!(λs, by = reim) ≈ sort!(θs, by = reim) + for T in (Float64, BigFloat) + R = triu(rand(T,n, n)) + R[1:2,1:2] .= rot(1.0) + I + for range = (1:3, 1:4) + λs = eigvals(R[range, range]) + θs = copy_eigenvalues!(rand(Complex{T}, length(range)), R, range) + @test sort!(λs, by = reim) ≈ sort!(θs, by = reim) + end end end diff --git a/test/expansion.jl b/test/expansion.jl index 3c016e5..d2d3947 100644 --- a/test/expansion.jl +++ b/test/expansion.jl @@ -12,38 +12,42 @@ end @testset "Arnoldi Factorization" begin n = 10 max = 6 - A = sprand(n, n, .1) + I - - arnoldi = Arnoldi{Float64}(n, max) - reinitialize!(arnoldi) - V, H = arnoldi.V, arnoldi.H - - # Do a few iterations - iterate_arnoldi!(A, arnoldi, 1:3) - @test A * V[:,1:3] ≈ V[:,1:4] * H[1:4,1:3] - @test norm(V[:,1:4]' * V[:,1:4] - I) < 1e-10 - - # Do the rest of the iterations. - iterate_arnoldi!(A, arnoldi, 4:max) - @test A * V[:,1:max] ≈ V * H - @test norm(V' * V - I) < 1e-10 + for T in (Float64, BigFloat) + A = sprand(T, n, n, .1) + I + + arnoldi = Arnoldi{T}(n, max) + reinitialize!(arnoldi) + V, H = arnoldi.V, arnoldi.H + + # Do a few iterations + iterate_arnoldi!(A, arnoldi, 1:3) + @test A * V[:,1:3] ≈ V[:,1:4] * H[1:4,1:3] + @test norm(V[:,1:4]' * V[:,1:4] - I) < sqrt(eps(T))/100 + + # Do the rest of the iterations. + iterate_arnoldi!(A, arnoldi, 4:max) + @test A * V[:,1:max] ≈ V * H + @test norm(V' * V - I) < sqrt(eps(T))/100 + end end @testset "Invariant subspace" begin # Generate a block-diagonal matrix A - A = [rand(4,4) zeros(4,4); - zeros(4,4) rand(4,4)] - - # and an initial vector [1; 0; ... 0] - vh = Arnoldi{Float64}(8, 5) - V, H = vh.V, vh.H - V[:,1] .= 0.0 - V[1,1] = 1.0 - - # Then {v, Av, A²v, A³v} - # is an invariant subspace - iterate_arnoldi!(A, vh, 1:5) - - @test norm(V' * V - I) < 1e-10 - @test iszero(H[5, 4]) + for T in (Float64, BigFloat) + A = [rand(T,4,4) zeros(T,4,4); + zeros(T,4,4) rand(T,4,4)] + + # and an initial vector [1; 0; ... 0] + vh = Arnoldi{T}(8, 5) + V, H = vh.V, vh.H + V[:,1] .= zero(T) + V[1,1] = one(T) + + # Then {v, Av, A²v, A³v} + # is an invariant subspace + iterate_arnoldi!(A, vh, 1:5) + + @test norm(V' * V - I) < sqrt(eps(T))/100 + @test iszero(H[5, 4]) + end end \ No newline at end of file diff --git a/test/givens_rotation.jl b/test/givens_rotation.jl index 42457a1..1e445d0 100644 --- a/test/givens_rotation.jl +++ b/test/givens_rotation.jl @@ -6,7 +6,7 @@ using ArnoldiMethod: Hessenberg, Rotation2, Rotation3 @testset "Givens rotation" begin @testset "Single rotation" begin - @testset "lmul!" for T in (Float64, ComplexF64) + @testset "lmul!" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) A = rand(T, 6, 5) G = Rotation2(rand(real(T)), rand(T), 2) @@ -16,7 +16,7 @@ using ArnoldiMethod: Hessenberg, Rotation2, Rotation3 @test G_mat * A ≈ lmul!(G, copy(A)) end - @testset "rmul!" for T in (Float64, ComplexF64) + @testset "rmul!" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) A = rand(T, 10, 5) G = Rotation2(rand(real(T)), rand(T), 2) @@ -28,7 +28,7 @@ using ArnoldiMethod: Hessenberg, Rotation2, Rotation3 end @testset "Double rotation" begin - @testset "lmul!" for T in (Float64, ComplexF64) + @testset "lmul!" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) A = rand(T, 6, 5) G = Rotation3(rand(real(T)), rand(T), rand(real(T)), rand(T), 2) @@ -38,7 +38,7 @@ using ArnoldiMethod: Hessenberg, Rotation2, Rotation3 @test G_mat * A ≈ lmul!(G, copy(A)) end - @testset "rmul!" for T in (Float64, ComplexF64) + @testset "rmul!" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) A = rand(T, 10, 5) G = Rotation3(rand(real(T)), rand(T), rand(real(T)), rand(T), 2) diff --git a/test/partial_schur.jl b/test/partial_schur.jl index 265cdc7..cb53ced 100644 --- a/test/partial_schur.jl +++ b/test/partial_schur.jl @@ -10,19 +10,20 @@ using LinearAlgebra # the stopping criterion works for these zero eigenvalues, we don't take # into account that it finds the complete eigenspace of the 0 eigenvalue. # (we have too few basis vectors for it anyways) + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) + A = rand(T,10, 3) - A = rand(10, 3) + # Rank 3 matrix. + B = A * A' - # Rank 3 matrix. - B = A * A' + schur, history = partialschur(B, nev = 5, mindim = 5, maxdim = 7, tol = eps()) - schur, history = partialschur(B, nev = 5, mindim = 5, maxdim = 7, tol = eps()) - - @test history.converged - @test history.mvproducts == 7 - @test norm(schur.Q'schur.Q - I) < 100eps() - @test norm(B * schur.Q - schur.Q * schur.R) < 100eps() - @test norm(diag(schur.R)[4:5]) < 100eps() + @test history.converged + @test history.mvproducts == 7 + @test norm(schur.Q'schur.Q - I) < 100eps(real(T)) + @test norm(B * schur.Q - schur.Q * schur.R) < 100eps(real(T)) + @test norm(diag(schur.R)[4:5]) < 100eps(real(T)) + end end @testset "Right number type" begin diff --git a/test/runtests.jl b/test/runtests.jl index 143a882..2718a01 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,15 +4,15 @@ using SparseArrays using Random using GenericSchur -# include("expansion.jl") -# include("givens_rotation.jl") -# include("ordering.jl") -# # -# include("schurfact.jl") -# include("sylvester.jl") -# include("sort_schur.jl") -# # include("collect_eigen.jl") -# -# include("partial_schur.jl") +include("expansion.jl") +include("givens_rotation.jl") +include("ordering.jl") + +include("schurfact.jl") +include("sylvester.jl") +include("sort_schur.jl") +include("collect_eigen.jl") + +include("partial_schur.jl") # include("locked_restart.jl") include("schur_to_eigen.jl") diff --git a/test/schurfact.jl b/test/schurfact.jl index 7933c3c..c62e319 100644 --- a/test/schurfact.jl +++ b/test/schurfact.jl @@ -8,106 +8,108 @@ using ArnoldiMethod: eigenvalues, local_schurfact!, is_offdiagonal_small, include("utils.jl") @testset "Schur factorization" begin - let - # 2-by-2 matrix with distinct eigenvalues while H[2,1] != 0 - H = [1.0 2.0; 3.0 4.0] - H′ = copy(H) - Q = Matrix{Float64}(I, 2, 2) - - @test local_schurfact!(H′, 1, 2, Q, eps(), 2) - @test norm(H * Q - Q * H′) < 10eps() - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) - @test iszero(H′[2,1]) - end - - let - # 2-by-2 matrix with distinct eigenvalues while H[2,1] = 0 - H = [1.0 2.0; 0.0 4.0] - H′ = copy(H) - Q = Matrix{Float64}(I, 2, 2) - - @test local_schurfact!(H′, 1, 2, Q, eps(), 2) - @test norm(H * Q - Q * H′) < 10eps() - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) - @test iszero(H′[2,1]) - end - - let - # 2-by-2 matrix with conjugate eigenvalues - H = [1.0 4.0; -5.0 3.0] - H′ = copy(H) - Q = Matrix{Float64}(I, 2, 2) - - @test local_schurfact!(H′, 1, 2, Q, eps(), 2) - @test norm(H * Q - Q * H′) < 10eps() - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) - @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) - end - - # Larger real matrix. - - let - n = 10 - # Transforming a 1+i by n-i block of the matrix H into upper triangular form - for i = 0 : 4 - Q = Matrix{Float64}(I, n, n) - H = triu(randn(Float64, n, n)) - H[1+i:n-i,1+i:n-i] = normal_hessenberg_matrix(Float64, i+1:n-i) + for T in (Float64, BigFloat) + let + # 2-by-2 matrix with distinct eigenvalues while H[2,1] != 0 + H = [one(T) 2one(T); 3one(T) 4one(T)] H′ = copy(H) + Q = Matrix{T}(I, 2, 2) + + @test local_schurfact!(H′, 1, 2, Q, eps(T), 2) + @test norm(H * Q - Q * H′) < 10eps(T) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) + @test iszero(H′[2,1]) + end - # Test that the procedure has converged - @test local_schurfact!(H′, 1+i, n-i, Q) - - for j = 1+i:n-i-1 - t = H′[j,j] + H′[j+1,j+1] - d = H′[j,j] * H′[j+1,j+1] - H′[j+1,j] * H′[j,j+1] - - # Test if subdiagonal is small. If not, check if conjugate eigenvalues. - @test is_offdiagonal_small(H′, j) || t^2 < 4d - end - - # Test that the elements below the subdiagonal are 0 - @test is_hessenberg(H′) - - # Test that the partial Schur decomposition relation holds - @test norm(H * Q - Q * H′) < 1000eps() + let + # 2-by-2 matrix with distinct eigenvalues while H[2,1] = 0 + H = [one(T) 2one(T); zero(T) 4one(T)] + H′ = copy(H) + Q = Matrix{T}(I, 2, 2) - # Test that the eigenvalues of H are the same before and after transformation - @test sort!(eigvals(H), by=realimag) ≈ sort!(eigvals(H′), by=realimag) + @test local_schurfact!(H′, 1, 2, Q, eps(T), 2) + @test norm(H * Q - Q * H′) < 10eps(T) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) + @test iszero(H′[2,1]) end - end + let + # 2-by-2 matrix with conjugate eigenvalues + H = [1one(T) 4one(T); -5one(T) 3one(T)] + H′ = copy(H) + Q = Matrix{T}(I, 2, 2) + + @test local_schurfact!(H′, 1, 2, Q, eps(T), 2) + @test norm(H * Q - Q * H′) < 10eps(T) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H′), by=realimag) + @test sort!(eigenvalues(H′), by=realimag) ≈ sort!(eigvals(H), by=realimag) + end + end + # Larger real matrix. + for T in (Float64,) #randn(BigFloat,n,n) does not yet exist https://github.com/JuliaLang/julia/pull/35111 + let + n = 10 + # Transforming a 1+i by n-i block of the matrix H into upper triangular form + for i = 0 : 4 + Q = Matrix{T}(I, n, n) + H = triu(randn(T, n, n)) + H[1+i:n-i,1+i:n-i] = normal_hessenberg_matrix(T, i+1:n-i) + H′ = copy(H) + + # Test that the procedure has converged + @test local_schurfact!(H′, 1+i, n-i, Q) + + for j = 1+i:n-i-1 + t = H′[j,j] + H′[j+1,j+1] + d = H′[j,j] * H′[j+1,j+1] - H′[j+1,j] * H′[j,j+1] + + # Test if subdiagonal is small. If not, check if conjugate eigenvalues. + @test is_offdiagonal_small(H′, j) || t^2 < 4d + end + + # Test that the elements below the subdiagonal are 0 + @test is_hessenberg(H′) + + # Test that the partial Schur decomposition relation holds + @test norm(H * Q - Q * H′) < 1000eps(T) + + # Test that the eigenvalues of H are the same before and after transformation + @test sort!(eigvals(H), by=realimag) ≈ sort!(eigvals(H′), by=realimag) + end + end + # COMPLEX ARITHMETIC - let - n = 10 - # Transforming a 1+i by 10-i block of the matrix H into upper triangular form - for i = 0 : 4 - Q = Matrix{ComplexF64}(I, n, n) - H = triu(randn(ComplexF64, n, n)) - H[i+1:n-i,i+1:n-i] = normal_hessenberg_matrix(ComplexF64, (i+1:n-i) .* (1 + im)) - H′ = copy(H) - - # Test that the procedure has converged - @test local_schurfact!(H′, 1+i, n-i, Q) - - # Test if subdiagonal is small. - for j = 1+i:n-i-1 - @test iszero(H′[j+1,j]) + let + n = 10 + # Transforming a 1+i by 10-i block of the matrix H into upper triangular form + for i = 0 : 4 + Q = Matrix{Complex{T}}(I, n, n) + H = triu(randn(Complex{T}, n, n)) + H[i+1:n-i,i+1:n-i] = normal_hessenberg_matrix(Complex{T}, (i+1:n-i) .* (1 + im)) + H′ = copy(H) + + # Test that the procedure has converged + @test local_schurfact!(H′, 1+i, n-i, Q) + + # Test if subdiagonal is small. + for j = 1+i:n-i-1 + @test iszero(H′[j+1,j]) + end + + # Test that the elements below the subdiagonal are 0 + @test is_hessenberg(H′) + + # Test that the partial Schur decomposition relation holds + @test norm(H * Q - Q * H′) < 1000eps(T) + + # Test that the eigenvalues of H are the same before and after transformation + @test sort!(eigvals(H), by=realimag) ≈ sort!(eigvals(H′), by=realimag) end - - # Test that the elements below the subdiagonal are 0 - @test is_hessenberg(H′) - - # Test that the partial Schur decomposition relation holds - @test norm(H * Q - Q * H′) < 1000eps() - - # Test that the eigenvalues of H are the same before and after transformation - @test sort!(eigvals(H), by=realimag) ≈ sort!(eigvals(H′), by=realimag) end end end @@ -119,6 +121,7 @@ end mat(ε) = [2 0 0 ; 5ε 1-ε 2ε ; 0 3ε 1+ε] - - @test local_schurfact!(mat(eps())) + for T in (Float64,BigFloat) + @test local_schurfact!(mat(eps(T))) + end end \ No newline at end of file diff --git a/test/sort_schur.jl b/test/sort_schur.jl index de13f01..11c3f61 100644 --- a/test/sort_schur.jl +++ b/test/sort_schur.jl @@ -6,7 +6,7 @@ using ArnoldiMethod: swap11!, swap12!, swap21!, swap22!, rotate_right!, eigenval # These tests are only necessary in real arithmetic, but why not do complex for completeness -@testset "Reordering the Schur form 1 ↔ 1 ($T)" for T in (Float64, ComplexF64) +@testset "Reordering the Schur form 1 ↔ 1 ($T)" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) Q1 = Matrix{T}(I, 2, 2) R1 = triu(rand(T, 2, 2)) Q2 = copy(Q1) @@ -19,7 +19,7 @@ using ArnoldiMethod: swap11!, swap12!, swap21!, swap22!, rotate_right!, eigenval @test R1 * Q2 ≈ Q2 * R2 end -@testset "Reordering the Schur form 1 ↔ 2 ($T)" for T in (Float64, ComplexF64) +@testset "Reordering the Schur form 1 ↔ 2 ($T)" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) # x x x # . x x # . x x @@ -39,7 +39,7 @@ end @test R1 * Q2 ≈ Q2 * R2 end -@testset "Reordering the Schur form 2 ↔ 1 ($T)" for T in (Float64, ComplexF64) +@testset "Reordering the Schur form 2 ↔ 1 ($T)" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) # x x x # x x x # . . x @@ -59,7 +59,7 @@ end @test R1 * Q2 ≈ Q2 * R2 end -@testset "Reordering the Schur form 2 ↔ 2 ($T)" for T in (Float64, ComplexF64) +@testset "Reordering the Schur form 2 ↔ 2 ($T)" for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) # x x x x # x x x x # . . x x @@ -84,129 +84,136 @@ end end @testset "Rotation right with single eigenvalues" begin - # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[4:5,4:5] - R = triu(rand(10, 10)) - Q = Matrix(1.0I, 10, 10) - R[4,5] = -2.0; R[5,4] = 2.0 + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) + # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[4:5,4:5] + R = triu(rand(T, 10, 10)) + Q = Matrix(one(T)*I, 10, 10) + R[4,5] = -2*one(T); R[5,4] = 2*one(T) - λ_before = eigenvalues(R) + λ_before = eigenvalues(R) - # Rotate the last block right before the first one. - R_after = copy(R) - rotate_right!(R_after, 1, 10, Q) - λ_after = eigenvalues(R_after) + # Rotate the last block right before the first one. + R_after = copy(R) + rotate_right!(R_after, 1, 10, Q) + λ_after = eigenvalues(R_after) - # Test whether Q is more or less a similarity transform - @test opnorm(R - Q * R_after * Q', 1) < 10eps() * opnorm(R, 1) + # Test whether Q is more or less a similarity transform + @test opnorm(R - Q * R_after * Q', 1) < 10eps(real(T)) * opnorm(R, 1) - # Test orthonormality of Q - @test norm(Q'Q - I) < 10eps() + # Test orthonormality of Q + @test norm(Q'Q - I) < 10eps(real(T)) - # Middle guys have been rotated - for (i, j) = zip(1:10, circshift(1:10, -1)) - @test λ_before[i] ≈ λ_after[j] + # Middle guys have been rotated + for (i, j) = zip(1:10, circshift(1:10, -1)) + @test λ_before[i] ≈ λ_after[j] + end end end @testset "Rotation right with two conjugate pairs" begin - # 10 × 10 quasi upper triangular matrix with 2 × 2 blocks on R[2:3,2:3] and R[6:7,6:7] - R = triu(rand(10, 10)) - Q = Matrix(1.0I, 10, 10) - R[3,2] = -2.0; R[2,3] = 2.0 - R[7,6] = 3.0; R[6,7] = -2.0 + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) + # 10 × 10 quasi upper triangular matrix with 2 × 2 blocks on R[2:3,2:3] and R[6:7,6:7] + R = triu(rand(T, 10, 10)) + Q = Matrix(one(T)*I, 10, 10) + R[3,2] = -2*one(T); R[2,3] = 2*one(T) + R[7,6] = 3*one(T); R[6,7] = -2*one(T) - λ_before = eigenvalues(R) + λ_before = eigenvalues(R) - # Rotate the last block right before the first one. - R_after = copy(R) - rotate_right!(R_after, 3, 6, Q) + # Rotate the last block right before the first one. + R_after = copy(R) + rotate_right!(R_after, 3, 6, Q) - λ_after = eigenvalues(R_after) + λ_after = eigenvalues(R_after) - # Test whether Q is more or less a similarity transform - @test opnorm(R - Q * R_after * Q', 1) < 10eps() * opnorm(R, 1) + # Test whether Q is more or less a similarity transform + @test opnorm(R - Q * R_after * Q', 1) < 10eps(real(T)) * opnorm(R, 1) - # Test orthonormality of Q - @test norm(Q'Q - I) < 10eps() + # Test orthonormality of Q + @test norm(Q'Q - I) < 10eps(real(T)) - # First eigenvalue should be exactly equal - @test λ_before[1] == λ_after[1] + # First eigenvalue should be exactly equal + @test λ_before[1] == λ_after[1] - # Middle guys have been rotated - for (i, j) = zip(2:7, circshift(2:7, -2)) - @test λ_before[i] ≈ λ_after[j] - end + # Middle guys have been rotated + for (i, j) = zip(2:7, circshift(2:7, -2)) + @test λ_before[i] ≈ λ_after[j] + end - # Last eigenvalues should be exactly equal - @test λ_before[8:10] == λ_after[8:10] + # Last eigenvalues should be exactly equal + @test λ_before[8:10] == λ_after[8:10] + end end @testset "Rotation right with one 2 × 2 block on the right" begin - # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[6:7,6:7] - R = triu(rand(10, 10)) - Q = Matrix(1.0I, 10, 10) - R[6,7] = -2.0; R[7,6] = 2.0 + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) + # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[6:7,6:7] + R = triu(rand(T,10, 10)) + Q = Matrix(one(T)*I, 10, 10) + R[6,7] = -2*one(T); R[7,6] = 2*one(T) - λ_before = eigenvalues(R) + λ_before = eigenvalues(R) - # Rotate the last block right before the first one. - R_after = copy(R) - rotate_right!(R_after, 2, 6, Q) - λ_after = eigenvalues(R_after) + # Rotate the last block right before the first one. + R_after = copy(R) + rotate_right!(R_after, 2, 6, Q) + λ_after = eigenvalues(R_after) - # Test whether Q is more or less a similarity transform - @test opnorm(R - Q * R_after * Q', 1) < 10eps() * opnorm(R, 1) + # Test whether Q is more or less a similarity transform + @test opnorm(R - Q * R_after * Q', 1) < 10eps(real(T)) * opnorm(R, 1) - # Test orthonormality of Q - @test norm(Q'Q - I) < 10eps() + # Test orthonormality of Q + @test norm(Q'Q - I) < 10eps(real(T)) - # First eigenvalue should be exactly equal - @test λ_before[1] == λ_after[1] + # First eigenvalue should be exactly equal + @test λ_before[1] == λ_after[1] - # Middle guys have been rotated - for (i, j) = zip(2:7, circshift(2:7, -2)) - @test λ_before[i] ≈ λ_after[j] - end + # Middle guys have been rotated + for (i, j) = zip(2:7, circshift(2:7, -2)) + @test λ_before[i] ≈ λ_after[j] + end - # Last eigenvalues should be exactly equal - for i = 8:10 - @test λ_before[i] == λ_after[i] + # Last eigenvalues should be exactly equal + for i = 8:10 + @test λ_before[i] == λ_after[i] + end end end @testset "Rotation right with one 2 × 2 block on the left" begin - # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[2:3,2:3] - R = triu(rand(10, 10)) - Q = Matrix(1.0I, 10, 10) - R[2,3] = -2.0; R[2,3] = 2.0 + for T in (Float64, ComplexF64, BigFloat, Complex{BigFloat}) + # 10 × 10 quasi upper triangular matrix with 2 × 2 block on R[2:3,2:3] + R = triu(rand(T, 10, 10)) + Q = Matrix(one(T)*I, 10, 10) + R[2,3] = -2*one(T); R[2,3] = 2*one(T) - λ_before = eigenvalues(R) + λ_before = eigenvalues(R) - # Rotate the last block right before the first one. - R_after = copy(R) - rotate_right!(R_after, 2, 6, Q) - λ_after = eigenvalues(R_after) + # Rotate the last block right before the first one. + R_after = copy(R) + rotate_right!(R_after, 2, 6, Q) + λ_after = eigenvalues(R_after) - # Test whether Q is more or less a similarity transform - @test opnorm(R - Q * R_after * Q', 1) < 10eps() * opnorm(R, 1) + # Test whether Q is more or less a similarity transform + @test opnorm(R - Q * R_after * Q', 1) < 10eps(real(T)) * opnorm(R, 1) - # Test orthonormality of Q - @test opnorm(Q'Q - I, 1) < 10 * eps() + # Test orthonormality of Q + @test opnorm(Q'Q - I, 1) < 10 * eps(real(T)) - # First eigenvalue should be exactly equal - @test λ_before[1] == λ_after[1] + # First eigenvalue should be exactly equal + @test λ_before[1] == λ_after[1] - # Middle guys have been rotated - for (i, j) = zip(2:6, circshift(2:6, -1)) - @test λ_before[i] ≈ λ_after[j] - end + # Middle guys have been rotated + for (i, j) = zip(2:6, circshift(2:6, -1)) + @test λ_before[i] ≈ λ_after[j] + end - # Last eigenvalues should be exactly equal - for i = 7:10 - @test λ_before[i] == λ_after[i] + # Last eigenvalues should be exactly equal + for i = 7:10 + @test λ_before[i] == λ_after[i] + end end - end # Stewart's example in Bai & Demmel's article @@ -215,55 +222,61 @@ end # Sorensen's implicit restart and convoluted locking + purging strategies that were # necessary exactly because of this. @testset "Stewart's example" begin - A(τ) = [7.0010 -87.0000 39.4000τ 22.2000τ; - 5.0000 7.0010 -12.2000τ 36.0000τ; - 0.0000 0.0000 7.0100 -11.7567 ; - 0.0000 0.0000 37.0000 7.0100 ] + A(τ) = [7+1//1000 -87 (39+2//5)*τ (22+2//5)*τ; + 5 7+1//1000 -(12+2//5)*τ 36τ; + 0 0 7+1//100 -7567//10000 ; + 0 0 37 7+1//100 ] - for τ in (1, 10, 100) - B = A(τ) - - # Eigenvalues do not depend on τ, but we just compute them here for ease. - λs_before = eigenvalues(B) - swap22!(B, 1) - λs_after = eigenvalues(B) - - # Test swapping is approximately equal - @test abs(λs_before[1]) ≈ abs(λs_after[3]) - @test abs(λs_before[3]) ≈ abs(λs_after[1]) + for T in (Float64, BigFloat) + for τ in (1, 10, 100) + B = A(τ*one(T)) + + # Eigenvalues do not depend on τ, but we just compute them here for ease. + λs_before = eigenvalues(B) + swap22!(B, 1) + λs_after = eigenvalues(B) + + # Test swapping is approximately equal + @test abs(λs_before[1]) ≈ abs(λs_after[3]) + @test abs(λs_before[3]) ≈ abs(λs_after[1]) + end end end # Example taken from Bai & Demmel @testset "Small eigenvalue separation" begin # This should result in a very ill-conditioned Sylvester equation. - A = [ 1.00 -100.0 400.000 -1000.000; - 0.01 1.0 1200.000 -10.000; - 0.00 0.0 1.0+eps() -0.010; - 0.00 0.0 100.000 1.0+eps()] - - A′ = copy(A) - Q = Matrix(1.0I, 4, 4) - λs_before = eigenvalues(A) - swap22!(A′, 1, Q) - λs_after = eigenvalues(A) - @test abs(λs_before[1]) ≈ abs(λs_after[3]) - @test abs(λs_before[3]) ≈ abs(λs_after[1]) - @test opnorm(I - Q'Q, 1) < 10eps() # we should be able to get rid of this prefactor? - @test opnorm(A * Q - Q * A′, 1) < opnorm(A, 1) * eps() + for T in (Float64, BigFloat) + A = [ 1 -100 400 -1000; + 1//100 1 1200 -10; + 0 0 1+eps(T) -1//100; + 0 0 100 1+eps(T)] + + A′ = copy(A) + Q = Matrix(one(T)*I, 4, 4) + λs_before = eigenvalues(A) + swap22!(A′, 1, Q) + λs_after = eigenvalues(A) + @test abs(λs_before[1]) ≈ abs(λs_after[3]) + @test abs(λs_before[3]) ≈ abs(λs_after[1]) + @test opnorm(I - Q'Q, 1) < 10eps(T) # we should be able to get rid of this prefactor? + @test opnorm(A * Q - Q * A′, 1) < opnorm(A, 1) * eps(T) + end end @testset "Identical eigenvalues should not blow up" begin - A = [1.0 2.0 3.0 4.0; - 0.0 1.0 5.0 6.0; - 0.0 0.0 1.0 7.0; - 0.0 0.0 0.0 1.0] - - A′ = copy(A) - swap22!(A′, 1) - @test A == A′ - swap12!(A′, 1) - @test A == A′ - swap21!(A′, 1) - @test A == A′ + for T in (Float64, BigFloat) + A = T[1 2 3 4; + 0 1 5 6; + 0 0 1 7; + 0 0 0 1] + + A′ = copy(A) + swap22!(A′, 1) + @test A == A′ + swap12!(A′, 1) + @test A == A′ + swap21!(A′, 1) + @test A == A′ + end end \ No newline at end of file From 2644c2abc20e39907008ed6423dacd0da4745cb6 Mon Sep 17 00:00:00 2001 From: fgerick Date: Wed, 17 Feb 2021 14:02:44 +0100 Subject: [PATCH 3/7] change ci to 1.5 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 524ba4a..d01acbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: julia os: - linux julia: - - 1.4 + - 1.5 notifications: email: false after_success: From 0b9facb7a7bdba119126c33746f03f34a07a7642 Mon Sep 17 00:00:00 2001 From: fgerick Date: Wed, 17 Feb 2021 14:09:58 +0100 Subject: [PATCH 4/7] up staticarrays --- Manifest.toml | 44 +++----------------------------------------- Project.toml | 2 +- 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index cf271e1..3bfe1c7 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,22 +1,5 @@ # This file is machine-generated - editing it directly is not advised -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[GenericSchur]] -deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "43b4dc5648028be2c6e96201aa3653903bd1af21" -uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.4.0" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - [[Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -24,17 +7,6 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - [[Random]] deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" @@ -42,26 +14,16 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - [[SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[StaticArrays]] -deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"] -git-tree-sha1 = "d432c79bef174a830304f8601427a4357dfdbfb7" +deps = ["LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "9da72ed50e94dbff92036da395275ed114e04d49" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "0.8.3" +version = "1.0.1" [[Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[Test]] -deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" diff --git a/Project.toml b/Project.toml index 8429926..f774bf1 100644 --- a/Project.toml +++ b/Project.toml @@ -18,4 +18,4 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "SparseArrays","GenericSchur"] +test = ["Test", "SparseArrays", "GenericSchur"] From b35ec4c6bd6d5f051677362b5d2b8ead73f036be Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 18 Feb 2021 16:42:51 +0100 Subject: [PATCH 5/7] Ignore and remove Manifest.toml --- .gitignore | 3 ++- Manifest.toml | 29 ----------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 Manifest.toml diff --git a/.gitignore b/.gitignore index 8f1d8ff..62913ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -docs/build \ No newline at end of file +docs/build +Manifest.toml \ No newline at end of file diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 3bfe1c7..0000000 --- a/Manifest.toml +++ /dev/null @@ -1,29 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[StaticArrays]] -deps = ["LinearAlgebra", "Random", "Statistics"] -git-tree-sha1 = "9da72ed50e94dbff92036da395275ed114e04d49" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.0.1" - -[[Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" From ea01824b87fb5179641e4d3f2422755e0c57fc5c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 18 Feb 2021 18:01:24 +0100 Subject: [PATCH 6/7] Fix CI --- .github/workflows/ci.yaml | 2 +- .travis.yml | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ee18dd8..4a2bcea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: - - "1.0" + - "1.3" - "1" - "nightly" os: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d01acbf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: julia -os: - - linux -julia: - - 1.5 -notifications: - email: false -after_success: - - julia -e 'using Pkg; Pkg.add(["Documenter", "Coverage"])' - - julia -e 'using Pkg, Coverage, ArnoldiMethod; cd(joinpath(dirname(pathof(ArnoldiMethod)), "..")); Codecov.submit(process_folder())' - - julia -e 'using Pkg, ArnoldiMethod; cd(joinpath(dirname(pathof(ArnoldiMethod)), "..")); include(joinpath("docs", "make.jl"))' From ad110a4792cf227fafebcc085a69519f705051b1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 18 Feb 2021 18:12:54 +0100 Subject: [PATCH 7/7] Bump version --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index f774bf1..3c5a97d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ArnoldiMethod" uuid = "ec485272-7323-5ecc-a04f-4719b315124d" author = ["Harmen Stoppels ", "Lauri Nyman"] -version = "0.1.0" +version = "0.2.0" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -10,7 +10,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] StaticArrays = "0.8, 0.9, 0.10, 0.11, 0.12, 1.0" -julia = "1" +julia = "1.3" [extras] GenericSchur = "c145ed77-6b09-5dd9-b285-bf645a82121e"