@@ -229,17 +229,17 @@ for V in spacelist
229229 @test isisometric (N)
230230 @test norm (N' * t) ≈ 0 atol = 100 * eps (norm (t))
231231
232- # N = @constinferred left_null(t; trunc = (; atol = 100 * eps(norm(t))))
233- # @test isisometric(N)
234- # @test norm(N' * t) ≈ 0 atol = 100 * eps(norm(t))
232+ N = @constinferred left_null (t; trunc = (; atol = 100 * eps (norm (t))))
233+ @test isisometric (N)
234+ @test norm (N' * t) ≈ 0 atol = 100 * eps (norm (t))
235235
236236 Nᴴ = @constinferred right_null (t; alg = :svd )
237237 @test isisometric (Nᴴ; side = :right )
238238 @test norm (t * Nᴴ' ) ≈ 0 atol = 100 * eps (norm (t))
239239
240- # Nᴴ = @constinferred right_null(t; trunc = (; atol = 100 * eps(norm(t))))
241- # @test isisometric(Nᴴ; side = :right)
242- # @test norm(t * Nᴴ') ≈ 0 atol = 100 * eps(norm(t))
240+ Nᴴ = @constinferred right_null (t; trunc = (; atol = 100 * eps (norm (t))))
241+ @test isisometric (Nᴴ; side = :right )
242+ @test norm (t * Nᴴ' ) ≈ 0 atol = 100 * eps (norm (t))
243243 end
244244
245245 # empty tensor
@@ -258,15 +258,15 @@ for V in spacelist
258258 end
259259 end
260260
261- #= @testset "truncated SVD" begin
261+ @testset " truncated SVD" begin
262262 for T in eltypes,
263263 t in (
264264 CUDA. randn (T, W, W),
265- # CUDA.randn(T, W, W)',
265+ CUDA. randn (T, W, W)' ,
266266 CUDA. randn (T, W, V4),
267267 CUDA. randn (T, V4, W),
268- # CUDA.randn(T, W, V4)',
269- # CUDA.randn(T, V4, W)',
268+ CUDA. randn (T, W, V4)' ,
269+ CUDA. randn (T, V4, W)' ,
270270 DiagonalTensorMap (CUDA. randn (T, reduceddim (V1)), V1),
271271 )
272272
@@ -327,7 +327,7 @@ for V in spacelist
327327 @test minimum (diagview (S5)) >= λ
328328 @test dim (domain (S5)) ≤ nvals
329329 end
330- end=# # TODO
330+ end
331331
332332 @testset " Eigenvalue decomposition" begin
333333 for T in eltypes,
@@ -349,10 +349,10 @@ for V in spacelist
349349 @test @constinferred isposdef (vdv)
350350 t isa DiagonalTensorMap || @test ! isposdef (t) # unlikely for non-hermitian map
351351
352- #= nvals = round(Int, dim(domain(t)) / 2)
352+ nvals = round (Int, dim (domain (t)) / 2 )
353353 d, v = @constinferred eig_trunc (t; trunc = truncrank (nvals))
354354 @test t * v ≈ v * d
355- @test dim(domain(d)) ≤ nvals=#
355+ @test dim (domain (d)) ≤ nvals
356356
357357 t2 = @constinferred project_hermitian (t)
358358 D, V = eigen (t2)
@@ -380,10 +380,9 @@ for V in spacelist
380380 @test isposdef (t2 - λ * one (t) + 0.1 * one (t2))
381381 @test ! isposdef (t2 - λ * one (t) - 0.1 * one (t2))
382382
383- # TODO
384- #= d, v = @constinferred eigh_trunc(t2; trunc = truncrank(nvals))
383+ d, v = @constinferred eigh_trunc (t2; trunc = truncrank (nvals))
385384 @test t2 * v ≈ v * d
386- @test dim(domain(d)) ≤ nvals=#
385+ @test dim (domain (d)) ≤ nvals
387386 end
388387 end
389388
0 commit comments