Skip to content

Commit 2d6518f

Browse files
author
Michael Abbott
committed
docstring for batched_transpose etc
1 parent 9612946 commit 2d6518f

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/batched/batchedadjtrans.jl

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
using LinearAlgebra
22
import Base: -
33

4-
"""
4+
_batched_doc = """
5+
batched_transpose(A::AbstractArray{T,3})
6+
batched_adjoint(A)
7+
8+
Equivalent to applying `transpose` or `adjoint` to each matrix `A[:,:,k]`.
9+
10+
These exist to control how `batched_mul` behaves,
11+
as it operated on such matrix slices of an array with `ndims(A)==3`.
12+
513
BatchedTranspose{T, N, S} <: AbstractBatchedMatrix{T, N}
6-
Batched transpose. Transpose a batch of matrix.
14+
BatchedAdjoint{T, N, S}
15+
16+
Lazy wrappers analogous to `Transpose` and `Adjoint`, returned by `batched_transpose`
717
"""
18+
19+
@doc _batched_doc
820
struct BatchedTranspose{T, S} <: AbstractArray{T, 3}
921
parent::S
1022
BatchedTranspose{T, S}(X::S) where {T, S} = new{T, S}(X)
1123
end
1224

13-
"""
14-
batched_transpose(A)
15-
Lazy batched transpose.
16-
"""
25+
@doc _batched_doc
1726
batched_transpose(A::AbstractArray{T}) where T = BatchedTranspose(A)
1827
batched_transpose(A::BatchedTranspose) = A.parent
1928

20-
"""
21-
BatchedAdjoint{T, N, S} <: AbstractBatchedMatrix{T, N}
22-
Batched ajoint. Transpose a batch of matrix.
23-
"""
29+
@doc _batched_doc
2430
struct BatchedAdjoint{T, S} <: AbstractArray{T, 3}
2531
parent::S
2632
BatchedAdjoint{T, S}(X::S) where {T, S} = new{T, S}(X)
2733
end
2834

29-
"""
30-
batched_adjoint(A)
31-
Lazy batched adjoint.
32-
"""
35+
@doc _batched_doc
3336
batched_adjoint(A::AbstractArray{T, 3}) where T = BatchedAdjoint(A)
3437
batched_adjoint(A::BatchedAdjoint) = A.parent
3538

0 commit comments

Comments
 (0)