diff src/LazyTensors/tensor_mapping.jl @ 848:be24e6374d24 operator_storage_array_of_table

Merge feature/setup_documenter
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 14 Jan 2022 13:34:40 +0100
parents 76e5682d0e52
children fb060e98ac0a
line wrap: on
line diff
--- a/src/LazyTensors/tensor_mapping.jl	Thu Jan 13 13:09:10 2022 +0100
+++ b/src/LazyTensors/tensor_mapping.jl	Fri Jan 14 13:34:40 2022 +0100
@@ -1,21 +1,24 @@
 """
     TensorMapping{T,R,D}
 
-Describes a mapping of a D dimension tensor to an R dimension tensor.
+Describes a mapping of a `D` dimension tensor to an `R` dimension tensor.
 The action of the mapping is implemented through the method
-
+```julia
     apply(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T}
+```
 
 The size of the range and domain that the operator works with should be returned by
 the functions
-
+```julia
     range_size(::TensorMapping)
     domain_size(::TensorMapping)
-
+```
 to allow querying for one or the other.
 
 Optionally the action of the transpose may be defined through
+```julia
     apply_transpose(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T}
+```
 """
 abstract type TensorMapping{T,R,D} end
 export TensorMapping
@@ -37,11 +40,13 @@
 export apply_transpose
 
 """
+    range_dim(::TensorMapping)
 Return the dimension of the range space of a given mapping
 """
 range_dim(::TensorMapping{T,R,D}) where {T,R,D} = R
 
 """
+    domain_dim(::TensorMapping)
 Return the dimension of the domain space of a given mapping
 """
 domain_dim(::TensorMapping{T,R,D}) where {T,R,D} = D