comparison src/LazyTensors/lazy_tensor_operations.jl @ 465:f270d82fc9ad feature/inflated_tensormapping

Change documention in an attempt to follow the guidelines
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 22 Oct 2020 10:46:23 +0200
parents 73882867c121
children 481e86e77c22 95f3b9036801
comparison
equal deleted inserted replaced
464:73882867c121 465:f270d82fc9ad
195 end 195 end
196 end 196 end
197 export InflatedTensorMapping 197 export InflatedTensorMapping
198 """ 198 """
199 InflatedTensorMapping(before, tm, after) 199 InflatedTensorMapping(before, tm, after)
200 InflatedTensorMapping(before,tm)
201 InflatedTensorMapping(tm,after)
200 202
201 The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s. 203 The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s.
204
205 If one of `before` or `after` is left out, a 0-dimensional `IdentityMapping` is used as the default value.
202 """ 206 """
203 InflatedTensorMapping(::IdentityMapping, ::TensorMapping, ::IdentityMapping) 207 InflatedTensorMapping(::IdentityMapping, ::TensorMapping, ::IdentityMapping)
204
205 """
206 InflatedTensorMapping(before,tm)
207
208 The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s and `after` is empty.
209 """
210 InflatedTensorMapping(before::IdentityMapping, tm::TensorMapping{T}) where T = InflatedTensorMapping(before,tm,IdentityMapping{T}()) 208 InflatedTensorMapping(before::IdentityMapping, tm::TensorMapping{T}) where T = InflatedTensorMapping(before,tm,IdentityMapping{T}())
211
212 """
213 InflatedTensorMapping(tm,after)
214
215 The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s and `before` is empty.
216 """
217 InflatedTensorMapping(tm::TensorMapping{T}, after::IdentityMapping) where T = InflatedTensorMapping(IdentityMapping{T}(),tm,after) 209 InflatedTensorMapping(tm::TensorMapping{T}, after::IdentityMapping) where T = InflatedTensorMapping(IdentityMapping{T}(),tm,after)
218 210 # Resolve ambiguity between the two previous methods
219 """
220 InflatedTensorMapping(I1,I2)
221
222 Specialized constructor for InflatedTensorMapping where `I1`,`I2` are IdentityMappings (required to resolve ambiguities).
223 Calls InflatedTensorMapping(before, tm)
224 """
225 InflatedTensorMapping(I1::IdentityMapping{T}, I2::IdentityMapping{T}) where T = InflatedTensorMapping(I1,I2,IdentityMapping{T}()) 211 InflatedTensorMapping(I1::IdentityMapping{T}, I2::IdentityMapping{T}) where T = InflatedTensorMapping(I1,I2,IdentityMapping{T}())
226 212
227 # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping 213 # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping
228 214
229 # TODO: Implement some pretty printing in terms of ⊗. E.g InflatedTensorMapping(I(3),B,I(2)) -> I(3)⊗B⊗I(2) 215 # TODO: Implement some pretty printing in terms of ⊗. E.g InflatedTensorMapping(I(3),B,I(2)) -> I(3)⊗B⊗I(2)