Mercurial > repos > public > sbplib_julia
diff test/testLazyTensors.jl @ 491:2dc2eac27f75 feature/outer_product
Add special methods for Identity mappings
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 05 Nov 2020 12:48:30 +0100 |
parents | 79a88269d7d0 |
children | 5a600ec40ccc |
line wrap: on
line diff
--- a/test/testLazyTensors.jl Mon Nov 02 22:12:24 2020 +0100 +++ b/test/testLazyTensors.jl Thu Nov 05 12:48:30 2020 +0100 @@ -447,6 +447,14 @@ @tullio BAv[k,i] := A[i,j]*B[k,l,m]*v₂[l,m,j] @test B̃Ã*v₂ ≈ BAv + @testset "Indentity mapping arguments" begin + @test LazyOuterProduct(IdentityMapping(3,2), IdentityMapping(1,2)) == IdentityMapping(3,2,1,2) + + Ã = LazyLinearMap(A,(1,),(2,)) + @test LazyOuterProduct(IdentityMapping(3,2), Ã) == InflatedTensorMapping(IdentityMapping(3,2),Ã) + @test LazyOuterProduct(Ã, IdentityMapping(3,2)) == InflatedTensorMapping(Ã,IdentityMapping(3,2)) + end + end end