comparison test/testLazyTensors.jl @ 428:6737e769a1ca

Reduce exessive tol in TensorMappingComposition tests
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 19 Oct 2020 20:42:13 +0200
parents 98ba9b7effd3
children 1db5ec38955e cffdac9c612d
comparison
equal deleted inserted replaced
427:1c41f4fd3e61 428:6737e769a1ca
226 @test_throws DimensionMismatch B̃∘Ã 226 @test_throws DimensionMismatch B̃∘Ã
227 227
228 # @test @inbounds B̃∘Ã # Should not error even though dimensions don't match. (Since ]test runs with forced boundschecking this is currently not testable 2020-10-16) 228 # @test @inbounds B̃∘Ã # Should not error even though dimensions don't match. (Since ]test runs with forced boundschecking this is currently not testable 2020-10-16)
229 229
230 v = rand(4) 230 v = rand(4)
231 @test Ã∘B̃*v ≈ A*B*v rtol=1e-16 231 @test Ã∘B̃*v ≈ A*B*v rtol=1e-14
232 232
233 v = rand(2) 233 v = rand(2)
234 @test (Ã∘B̃)'*v ≈ B'*A'*v rtol=1e-16 234 @test (Ã∘B̃)'*v ≈ B'*A'*v rtol=1e-14
235 end 235 end
236 236
237 @testset "LazyLinearMap" begin 237 @testset "LazyLinearMap" begin
238 # Test a standard matrix-vector product 238 # Test a standard matrix-vector product
239 # mapping vectors of size 4 to vectors of size 3. 239 # mapping vectors of size 4 to vectors of size 3.