comparison src/LazyTensors/lazy_tensor_operations.jl @ 474:3ad327378b2d feature/outer_product

Simplify implementation of \otimes
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 26 Oct 2020 23:01:47 +0100
parents 0c3decc04649
children 2c0e76d5832d
comparison
equal deleted inserted replaced
470:0c3decc04649 474:3ad327378b2d
324 return itm1∘itm2 324 return itm1∘itm2
325 end 325 end
326 326
327 LazyOuterProduct(tms::Vararg{TensorMapping}) = foldl(LazyOuterProduct, tms) 327 LazyOuterProduct(tms::Vararg{TensorMapping}) = foldl(LazyOuterProduct, tms)
328 328
329 ⊗(tms::Vararg{TensorMapping}) = LazyOuterProduct(tms...) 329 ⊗(a::TensorMapping, b::TensorMapping) = LazyOuterProduct(a,b)
330 export ⊗ 330 export ⊗
331 331
332 # TODO: Can we implement compositions and kroneckers of LazyIdentities to just return new LazyIdentities? 332 # TODO: Can we implement compositions and kroneckers of LazyIdentities to just return new LazyIdentities?