Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 1088:62f321caa964 refactor/sbpoperators/inflation
Improve docs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 10 May 2022 20:21:15 +0200 |
parents | f857057e61e6 |
children | 2278730f9cee |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Tue Mar 22 22:05:34 2022 +0100 +++ b/src/LazyTensors/lazy_tensor_operations.jl Tue May 10 20:21:15 2022 +0200 @@ -270,11 +270,20 @@ """ - inflate(tm, sz, dir) + inflate(tm::LazyTensor, sz, dir) + +Inflate `tm` such that it gets the size `sz` in all directions except `dir`. +Here `sz[dir]` is ignored and replaced with the range and domains size of +`tm`. -Inflate `tm` with identity tensors in all directions `d` for `d != dir`. +An example of when this operation is useful is when extending a one +dimensional difference operator `D` to a 2D grid of a ceratin size. In that +case we could have -# TODO: Describe when it is useful +```julia +Dx = inflate(D, (10,10), 1) +Dy = inflate(D, (10,10), 2) +``` """ function inflate(tm::LazyTensor, sz, dir) Is = IdentityTensor{eltype(tm)}.(sz)