comparison src/LazyTensors/tensor_mapping.jl @ 838:76e5682d0e52 feature/setup_documenter

Fix a bunch of docstring mistakes
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 14 Jan 2022 09:19:07 +0100
parents cd509e57f898
children fb060e98ac0a
comparison
equal deleted inserted replaced
837:126e169bb0b7 838:76e5682d0e52
1 """ 1 """
2 TensorMapping{T,R,D} 2 TensorMapping{T,R,D}
3 3
4 Describes a mapping of a D dimension tensor to an R dimension tensor. 4 Describes a mapping of a `D` dimension tensor to an `R` dimension tensor.
5 The action of the mapping is implemented through the method 5 The action of the mapping is implemented through the method
6 6 ```julia
7 apply(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T} 7 apply(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T}
8 ```
8 9
9 The size of the range and domain that the operator works with should be returned by 10 The size of the range and domain that the operator works with should be returned by
10 the functions 11 the functions
11 12 ```julia
12 range_size(::TensorMapping) 13 range_size(::TensorMapping)
13 domain_size(::TensorMapping) 14 domain_size(::TensorMapping)
14 15 ```
15 to allow querying for one or the other. 16 to allow querying for one or the other.
16 17
17 Optionally the action of the transpose may be defined through 18 Optionally the action of the transpose may be defined through
19 ```julia
18 apply_transpose(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T} 20 apply_transpose(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T}
21 ```
19 """ 22 """
20 abstract type TensorMapping{T,R,D} end 23 abstract type TensorMapping{T,R,D} end
21 export TensorMapping 24 export TensorMapping
22 25
23 """ 26 """
35 """ 38 """
36 function apply_transpose end 39 function apply_transpose end
37 export apply_transpose 40 export apply_transpose
38 41
39 """ 42 """
43 range_dim(::TensorMapping)
40 Return the dimension of the range space of a given mapping 44 Return the dimension of the range space of a given mapping
41 """ 45 """
42 range_dim(::TensorMapping{T,R,D}) where {T,R,D} = R 46 range_dim(::TensorMapping{T,R,D}) where {T,R,D} = R
43 47
44 """ 48 """
49 domain_dim(::TensorMapping)
45 Return the dimension of the domain space of a given mapping 50 Return the dimension of the domain space of a given mapping
46 """ 51 """
47 domain_dim(::TensorMapping{T,R,D}) where {T,R,D} = D 52 domain_dim(::TensorMapping{T,R,D}) where {T,R,D} = D
48 53
49 export range_dim, domain_dim 54 export range_dim, domain_dim