Mercurial > repos > public > sbplib_julia
comparison test/testLazyTensors.jl @ 399:3b4b1758a8ad feature/lazy_linear_map
Add a check for permuted indecies.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 04 Oct 2020 21:37:00 +0200 |
parents | 7ad644d112de |
children | 4aa59af074ef d94891b8dfca |
comparison
equal
deleted
inserted
replaced
394:7ad644d112de | 399:3b4b1758a8ad |
---|---|
226 @test domain_size(Ã) == (4,) | 226 @test domain_size(Ã) == (4,) |
227 | 227 |
228 @test Ã*ones(4) ≈ A*ones(4) atol=5e-13 | 228 @test Ã*ones(4) ≈ A*ones(4) atol=5e-13 |
229 @test Ã*v ≈ A*v atol=5e-13 | 229 @test Ã*v ≈ A*v atol=5e-13 |
230 | 230 |
231 A = rand(2,3,4) | |
232 @test_throws DomainError LazyLinearMap(A, (3,1), (2,)) | |
233 | |
231 # Test more exotic mappings | 234 # Test more exotic mappings |
232 B = rand(3,4,2) | 235 B = rand(3,4,2) |
233 # Map vectors of size 2 to matrices of size (3,4) | 236 # Map vectors of size 2 to matrices of size (3,4) |
234 B̃ = LazyLinearMap(B, (1,2), (3,)) | 237 B̃ = LazyLinearMap(B, (1,2), (3,)) |
235 v = rand(2) | 238 v = rand(2) |