changeset 448:912ae510dec9 feature/inflated_tensormapping

Use new name of IdentityMapping
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 19 Oct 2020 21:04:51 +0200
parents 27e0e256e5d9
children 14d60de71b72
files src/LazyTensors/lazy_tensor_operations.jl test/testLazyTensors.jl
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Mon Oct 19 20:59:08 2020 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Mon Oct 19 21:04:51 2020 +0200
@@ -167,9 +167,9 @@
 apply_transpose(tmi::IdentityMapping{T,D}, v::AbstractArray{T,D}, I::Vararg{Any,D}) where {T,D} = v[I...]
 
 struct InflatedTensorMapping{T,R,D,D_before,R_middle,D_middle,D_after} <: TensorMapping{T,R,D}
-    before::LazyIdentity{T,D_before}
+    before::IdentityMapping{T,D_before}
     tm::TensorMapping{T,R_middle,D_middle}
-    after::LazyIdentity{T,D_after}
+    after::IdentityMapping{T,D_after}
 
     function InflatedTensorMapping(before, tm::TensorMapping{T}, after) where T
         R_before = range_dim(before)
@@ -182,11 +182,12 @@
         D_after = domain_dim(after)
         D = D_before+D_middle+D_after
         return new{T,R,D,D_before,R_middle,D_middle,D_after}(before, tm, after)
+    end
 end
 
 # TODO: Implement constructors where one of `before` or `after` is missing
 
-# TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and LazyIdentity
+# TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping
 
 # TODO: Implement some pretty printing in terms of ⊗. E.g InflatedTensorMapping(I(3),B,I(2)) -> I(3)⊗B⊗I(2)
 
--- a/test/testLazyTensors.jl	Mon Oct 19 20:59:08 2020 +0200
+++ b/test/testLazyTensors.jl	Mon Oct 19 21:04:51 2020 +0200
@@ -302,4 +302,8 @@
     @inferred range_size(I)
 end
 
+@testset "InflatedTensorMapping" begin
+
 end
+
+end