comparison src/LazyTensors/lazy_tensor_operations.jl @ 462:c364e2908c6e feature/inflated_tensormapping

Implement InflatedTensorMapping where one of before and after are missing.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 21 Oct 2020 22:06:26 +0200
parents 41f9cb6ee5a7
children 5d6cbb7bfc23
comparison
equal deleted inserted replaced
458:41f9cb6ee5a7 462:c364e2908c6e
188 return new{T,R,D,D_before,R_middle,D_middle,D_after, typeof(tm)}(before, tm, after) 188 return new{T,R,D,D_before,R_middle,D_middle,D_after, typeof(tm)}(before, tm, after)
189 end 189 end
190 end 190 end
191 export InflatedTensorMapping 191 export InflatedTensorMapping
192 192
193 # TODO: Implement constructors where one of `before` or `after` is missing 193 """
194 InflatedTensorMapping(before,tm)
195
196 Constructs the InflatedTensorMapping where InflatedTensorMapping.after is the empty IdentityMapping
197 """
198 InflatedTensorMapping(before::IdentityMapping, tm::TensorMapping{T}) where T = InflatedTensorMapping(before,tm,IdentityMapping{T}())
199
200 """
201 InflatedTensorMapping(tm,after)
202
203 Constructs the InflatedTensorMapping where InflatedTensorMapping.before is the empty IdentityMapping
204 """
205 InflatedTensorMapping(tm::TensorMapping{T}, after::IdentityMapping) where T = InflatedTensorMapping(IdentityMapping{T}(),tm,after)
206
207 """
208 InflatedTensorMapping(I1,I2)
209
210 Specialized constructor for InflatedTensorMapping where `I1`,`I2` are IdentityMappings (required to resolve ambiguities).
211 Calls InflatedTensorMapping(before, tm)
212 """
213 InflatedTensorMapping(I1::IdentityMapping{T}, I2::IdentityMapping{T}) where T = InflatedTensorMapping(I1,I2,IdentityMapping{T}())
194 214
195 # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping 215 # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping
196 216
197 # TODO: Implement some pretty printing in terms of ⊗. E.g InflatedTensorMapping(I(3),B,I(2)) -> I(3)⊗B⊗I(2) 217 # TODO: Implement some pretty printing in terms of ⊗. E.g InflatedTensorMapping(I(3),B,I(2)) -> I(3)⊗B⊗I(2)
198 218