comparison test/testLazyTensors.jl @ 500:1c50b5f1b356 feature/outer_product

Add a test
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 05 Nov 2020 15:37:53 +0100
parents 5a600ec40ccc
children 27e64b3d3efa
comparison
equal deleted inserted replaced
499:7b550c714f3f 500:1c50b5f1b356
476 @test LazyOuterProduct(IdentityMapping(3,2), IdentityMapping(1,2)) == IdentityMapping(3,2,1,2) 476 @test LazyOuterProduct(IdentityMapping(3,2), IdentityMapping(1,2)) == IdentityMapping(3,2,1,2)
477 477
478 Ã = LazyLinearMap(A,(1,),(2,)) 478 Ã = LazyLinearMap(A,(1,),(2,))
479 @test LazyOuterProduct(IdentityMapping(3,2), Ã) == InflatedTensorMapping(IdentityMapping(3,2),Ã) 479 @test LazyOuterProduct(IdentityMapping(3,2), Ã) == InflatedTensorMapping(IdentityMapping(3,2),Ã)
480 @test LazyOuterProduct(Ã, IdentityMapping(3,2)) == InflatedTensorMapping(Ã,IdentityMapping(3,2)) 480 @test LazyOuterProduct(Ã, IdentityMapping(3,2)) == InflatedTensorMapping(Ã,IdentityMapping(3,2))
481 end 481
482 482 I1 = IdentityMapping(3,2)
483 end 483 I2 = IdentityMapping(4)
484 484 @test I1⊗Ã⊗I2 == InflatedTensorMapping(I1, Ã, I2)
485 end 485 end
486
487 end
488
489 end