Skip to content

Commit 6a241e9

Browse files
authored
Normalized(::Jacobi) plan now calls Jacobi plans (#252)
* Normalized(::Jacobi) plan now calls Jacobi plans * v0.15.10
1 parent edf1de3 commit 6a241e9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ClassicalOrthogonalPolynomials"
22
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
3-
version = "0.15.9"
3+
version = "0.15.10"
44
authors = ["Sheehan Olver <[email protected]>"]
55

66
[deps]

src/classical/jacobi.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,15 @@ plotgrid(P::AbstractJacobi{T}, n::Integer) where T = ChebyshevGrid{2,T}(min(40n,
284284
plan_transform(::AbstractJacobi{T}, szs::NTuple{N,Int}, dims...) where {T,N} = error("Override")
285285
plan_transform(P::Jacobi{T}, szs::NTuple{N,Int}, dims...) where {T,N} = JacobiTransformPlan(FastTransforms.plan_th_cheb2jac!(T, szs, P.a, P.b, dims...), plan_chebyshevtransform(T, szs, dims...))
286286

287+
grid(P::Normalized{T,<:AbstractJacobi{T}}, n::Integer) where T = grid(P.P, n)
288+
function plan_transform(Q::Normalized{T,<:AbstractJacobi{T}}, szs::NTuple{N,Int}, dims=ntuple(identity,Val(N))) where {T,N}
289+
dimsz = tuple(getindex.(Ref(szs), dims)...) # get the sizes of transformed dimensions
290+
D = Q \ Q.P
291+
M = MulPlan(map(dimsz) do n
292+
Diagonal(convert(Vector, D.diag[1:n])) # convert avoids lazy arrays
293+
end, plan_transform(Q.P, szs, dims), dims)
294+
end
295+
287296
ldiv(P::Jacobi{V}, f::Inclusion{T}) where {T,V} = _op_ldiv(P, f)
288297
ldiv(P::Jacobi{V}, f::AbstractQuasiFill{T,1}) where {T,V} = _op_ldiv(P, f)
289298
function transform_ldiv(P::Jacobi{V}, f::AbstractQuasiArray) where V

0 commit comments

Comments
 (0)