Mercurial > repos > public > sbplib_julia
changeset 461:a0e40d16ba0e feature/inflated_tensormapping
Better documentation
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 21 Oct 2020 22:02:07 +0200 |
parents | acffa3a1395d |
children | 5d6cbb7bfc23 a52f38e72258 |
files | src/LazyTensors/lazy_tensor_operations.jl |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 21 21:44:35 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 21 22:02:07 2020 +0200 @@ -175,18 +175,12 @@ InflatedTensorMapping{T,R,D} <: TensorMapping{T,R,D} An inflated `TensorMapping` with dimensions added before and afer its actual dimensions. - """ struct InflatedTensorMapping{T,R,D,D_before,R_middle,D_middle,D_after, TM<:TensorMapping{T,R_middle,D_middle}} <: TensorMapping{T,R,D} before::IdentityMapping{T,D_before} tm::TM after::IdentityMapping{T,D_after} - ``` - InflatedTensorMapping(before, tm, after) - - The outer product of `before`, `tm` and `after`, where `before` and `after` are `IndentityMapping`s. - ``` function InflatedTensorMapping(before, tm::TensorMapping{T}, after) where T R_before = range_dim(before) R_middle = range_dim(tm) @@ -202,6 +196,12 @@ end export InflatedTensorMapping +""" + InflatedTensorMapping(before, tm, after) + +The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s. +""" +InflatedTensorMapping(::IdentityMapping, ::TensorMapping, ::IdentityMapping) # TODO: Implement constructors where one of `before` or `after` is missing # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping