Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/amd/factorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ for V in spacelist
@test t * Vᴴ1' ≈ U1 * S1
@test isisometric(U1)
@test isisometric(Vᴴ1; side = :right)
@test norm(t - U1 * S1 * Vᴴ1) ≈ ϵ1 atol = eps(real(T))^(4 / 5)
@test norm(adapt(Vector{T}, t) - adapt(Vector{T}, U1) * adapt(Vector{T}, S1) * adapt(Vector{T}, Vᴴ1)) ≈ ϵ1 atol = eps(real(T))^(4 / 5)
@test abs(dim(domain(S1)) - nvals) ≤ maximum(c -> blockdim(domain(t), c), blocksectors(t); init = 1)

λ = minimum(diagview(S1))
Expand All @@ -383,7 +383,7 @@ for V in spacelist
@test t * Vᴴ2' ≈ U2 * S2
@test isisometric(U2)
@test isisometric(Vᴴ2; side = :right)
@test norm(t - U2 * S2 * Vᴴ2) ≈ ϵ2 atol = eps(real(T))^(4 / 5)
@test norm(adapt(Vector{T}, t) - adapt(Vector{T}, U2) * adapt(Vector{T}, S2) * adapt(Vector{T}, Vᴴ2))ϵ1 atol = eps(real(T))^(4 / 5)
@test minimum(diagview(S1)) >= λ
@test U2 ≈ U1
@test S2 ≈ S1
Expand All @@ -395,15 +395,15 @@ for V in spacelist
@test t * Vᴴ3' ≈ U3 * S3
@test isisometric(U3)
@test isisometric(Vᴴ3; side = :right)
@test norm(t - U3 * S3 * Vᴴ3) ≈ ϵ3 atol = eps(real(T))^(4 / 5)
@test norm(adapt(Vector{T}, t) - adapt(Vector{T}, U3) * adapt(Vector{T}, S3) * adapt(Vector{T}, Vᴴ3))ϵ1 atol = eps(real(T))^(4 / 5)
@test space(S3, 1) ≾ space(S2, 1)

for trunc in (truncerror(; atol = ϵ2), truncerror(; rtol = ϵ2 / norm(t)))
U4, S4, Vᴴ4, ϵ4 = @constinferred svd_trunc(t; trunc)
@test t * Vᴴ4' ≈ U4 * S4
@test isisometric(U4)
@test isisometric(Vᴴ4; side = :right)
@test norm(t - U4 * S4 * Vᴴ4) ≈ ϵ4 atol = eps(real(T))^(4 / 5)
@test norm(adapt(Vector{T}, t) - adapt(Vector{T}, U4) * adapt(Vector{T}, S4) * adapt(Vector{T}, Vᴴ4))ϵ1 atol = eps(real(T))^(4 / 5)
@test ϵ4 ≤ ϵ2
end

Expand All @@ -412,7 +412,7 @@ for V in spacelist
@test t * Vᴴ5' ≈ U5 * S5
@test isisometric(U5)
@test isisometric(Vᴴ5; side = :right)
@test norm(t - U5 * S5 * Vᴴ5) ≈ ϵ5 atol = eps(real(T))^(4 / 5)
@test norm(adapt(Vector{T}, t) - adapt(Vector{T}, U5) * adapt(Vector{T}, S5) * adapt(Vector{T}, Vᴴ5))ϵ1 atol = eps(real(T))^(4 / 5)
@test minimum(diagview(S5)) >= λ
@test abs(dim(domain(S5)) - nvals) ≤ maximum(c -> blockdim(domain(t), c), blocksectors(t); init = 1)
end
Expand Down
Loading