Skip to content

Commit 238129f

Browse files
committed
Normalized(::Jacobi) plan now calls Jacobi plans
1 parent edf1de3 commit 238129f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)