Skip to content

Commit c8b15cb

Browse files
authored
docs for plan_transform (#209)
1 parent 5a46d24 commit c8b15cb

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/src/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ weaklaplacian
5353
transform
5454
```
5555
```@docs
56+
plan_transform
57+
```
58+
```@docs
5659
expand
5760
```
5861
```@docs

src/bases/bases.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,25 @@ function plan_transform_layout(lay, L, szs::NTuple{N,Union{Int,Block{1}}}, dims=
239239
InvPlan(mapfactorize(L, dimsz), dims)
240240
end
241241
plan_transform_layout(::MappedBasisLayout, L, szs::NTuple{N,Union{Int,Block{1}}}, dims=ntuple(identity,Val(N))) where N = plan_transform(demap(L), szs, dims)
242+
243+
"""
244+
plan_transform(basis, (n₁,…,nₘ), [dims])
245+
246+
plans a transform applying the transform to an array specified by the
247+
sizes `(n₁,…,nₘ)`. If `nₖ` is an integer then this gives the size in that dimension.
248+
If `nₖ` is a `Block` then the array in that dimension is specified by `axes(basis,1)[Block.(Base.oneto(nₖ)]`.
249+
The array it acts on should correspond to samples on the points specified by `grid(basis, (n₁,…,nₘ))`.
250+
251+
If `dims` is an integer or tuple of integers then the transform is only applied to that dimension.
252+
If `dims` is omitted then every dimension is transformed.
253+
"""
242254
plan_transform(L, szs::NTuple{N,Union{Int,Block{1}}}, dims=ntuple(identity,Val(N))) where N = plan_transform_layout(MemoryLayout(L), L, szs, dims)
243255

256+
"""
257+
plan_transform(basis, A::AbstractArray, [dims])
258+
259+
is equivalent to `plan_transform(basis, size(A), [dims])`.
260+
"""
244261
plan_transform(L, arr::AbstractArray, dims...) = plan_transform(L, size(arr), dims...)
245262
plan_transform(L, lng::Union{Integer,Block{1}}, dims...) = plan_transform(L, (lng,), dims...)
246263
plan_transform(L) = plan_transform(L, size(L,2))

0 commit comments

Comments
 (0)