Skip to content

Commit d704080

Browse files
committed
add tests
1 parent 9b53ddf commit d704080

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/factorizations.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,14 @@ for V in spacelist
260260
@test isisometry(U4)
261261
@test isisometry(Vᴴ4; side = :right)
262262
@test norm(t - U4 * S4 * Vᴴ4) <= 0.5
263+
264+
trunc = truncrank(dim(domain(S)) ÷ 2) & trunctol(; atol = λ - 10eps(λ))
265+
U5, S5, Vᴴ5 = @constinferred svd_trunc(t; trunc)
266+
@test t * Vᴴ5' U5 * S5
267+
@test isisometry(U5)
268+
@test isisometry(Vᴴ5; side = :right)
269+
@test minimum(minimum, values(LinearAlgebra.diag(S5))) >= λ
270+
@test dim(domain(S5)) dim(domain(S)) ÷ 2
263271
end
264272
end
265273

0 commit comments

Comments
 (0)