Mercurial > repos > public > sbplib_julia
comparison test/LazyTensors/lazy_tensor_operations_test.jl @ 1089:2278730f9cee refactor/sbpoperators/inflation
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 10 May 2022 20:24:20 +0200 |
parents | f857057e61e6 2e606d4c0ab1 |
children | f1bb1b6d85dd |
comparison
equal
deleted
inserted
replaced
1088:62f321caa964 | 1089:2278730f9cee |
---|---|
179 v = rand(2) | 179 v = rand(2) |
180 @test (Ã∘B̃)'*v ≈ B'*A'*v rtol=1e-14 | 180 @test (Ã∘B̃)'*v ≈ B'*A'*v rtol=1e-14 |
181 | 181 |
182 @test (Ã∘B̃*ComplexF64[1.,2.,3.,4.])[1] isa ComplexF64 | 182 @test (Ã∘B̃*ComplexF64[1.,2.,3.,4.])[1] isa ComplexF64 |
183 @test ((Ã∘B̃)'*ComplexF64[1.,2.])[1] isa ComplexF64 | 183 @test ((Ã∘B̃)'*ComplexF64[1.,2.])[1] isa ComplexF64 |
184 | |
185 a = 2. | |
186 v = rand(3) | |
187 @test a*Ã isa TensorComposition | |
188 @test a*Ã == Ã*a | |
189 @test range_size(a*Ã) == range_size(Ã) | |
190 @test domain_size(a*Ã) == domain_size(Ã) | |
191 @test a*Ã*v == a.*A*v | |
184 end | 192 end |
185 | 193 |
186 | 194 |
187 @testset "InflatedTensor" begin | 195 @testset "InflatedTensor" begin |
188 I(sz...) = IdentityTensor(sz...) | 196 I(sz...) = IdentityTensor(sz...) |