diff src/LazyTensors/lazy_tensor_operations.jl @ 460:acffa3a1395d feature/inflated_tensormapping

Move part of the documentation to the constructor
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 21 Oct 2020 21:44:35 +0200
parents 11e58c49fb46
children a0e40d16ba0e
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Wed Oct 21 21:30:18 2020 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Wed Oct 21 21:44:35 2020 +0200
@@ -170,22 +170,23 @@
 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.
 
----
-
-    InflatedTensorMapping(before, tm, after)
-
-The outer product of `before`, `tm` and `after`, where `before` and `after` are `IndentityMapping`s.
 """
 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)