Mercurial > repos > public > sbplib_julia
diff test/testLazyTensors.jl @ 479:95f3b9036801 feature/compose_identity_mappings
Specialize composition operator for composing a tensormapping with an identitymapping.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 04 Nov 2020 20:03:37 +0100 |
parents | 3f3001d1020f |
children | 4b49f03bdb98 |
line wrap: on
line diff
--- a/test/testLazyTensors.jl Mon Nov 02 21:33:35 2020 +0100 +++ b/test/testLazyTensors.jl Wed Nov 04 20:03:37 2020 +0100 @@ -312,6 +312,17 @@ @inferred range_dim(I) @inferred domain_dim(I) + + Ã = rand(4,2) + A = LazyLinearMap(Ã,(1,),(2,)) + I1 = IdentityMapping{Float64}(2) + I2 = IdentityMapping{Float64}(4) + @test A∘I1 == A + @test I2∘A == A + @test I1∘I1 == I1 + @test_throws DimensionMismatch I1∘A + @test_throws DimensionMismatch A∘I2 + @test_throws DimensionMismatch I1∘I2 end @testset "InflatedTensorMapping" begin