Mercurial > repos > public > sbplib_julia
changeset 463:5d6cbb7bfc23 feature/inflated_tensormapping
Merge documentation of InflatedTensorMapping
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 22 Oct 2020 10:02:36 +0200 |
parents | c364e2908c6e (current diff) a0e40d16ba0e (diff) |
children | 73882867c121 |
files | src/LazyTensors/lazy_tensor_operations.jl |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 21 22:06:26 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Thu Oct 22 10:02:36 2020 +0200 @@ -170,6 +170,12 @@ apply(tmi::IdentityMapping{T,D}, v::AbstractArray{T,D}, I::Vararg{Any,D}) where {T,D} = v[I...] apply_transpose(tmi::IdentityMapping{T,D}, v::AbstractArray{T,D}, I::Vararg{Any,D}) where {T,D} = v[I...] + +""" + 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 @@ -191,6 +197,11 @@ export InflatedTensorMapping """ +InflatedTensorMapping(before, tm, after) + +The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s. +""" +""" InflatedTensorMapping(before,tm) Constructs the InflatedTensorMapping where InflatedTensorMapping.after is the empty IdentityMapping