JuliaApproximation / FastTransforms.jl

:rocket: Julia package for orthogonal polynomial transforms :snowboarder:
Other
264 stars 27 forks source link

big chebyshevu #145

Open dlfivefifty opened 3 years ago

dlfivefifty commented 3 years ago
julia> plan_chebyshevutransform(big.([1.,2.]))
ERROR: MethodError: no method matching plan_chebyshevutransform(::Vector{BigFloat}, ::Val{1})
Closest candidates are:
  plan_chebyshevutransform(::AbstractVector{T}, ::Val{1}) where T<:Union{Float32, Float64, ComplexF32, ComplexF64} at /Users/sheehanolver/.julia/packages/FastTransforms/47F6t/src/chebyshevtransform.jl:250
  plan_chebyshevutransform(::AbstractVector{T} where T) at /Users/sheehanolver/.julia/packages/FastTransforms/47F6t/src/chebyshevtransform.jl:263
Stacktrace:
 [1] plan_chebyshevutransform(x::Vector{BigFloat})
   @ FastTransforms ~/.julia/packages/FastTransforms/47F6t/src/chebyshevtransform.jl:263
 [2] top-level scope
   @ REPL[68]:1
MikaelSlevinsky commented 3 years ago

Second kind points with first kind polynomials doesn't work either

julia> chebyshevtransform(BigFloat[1, 2], Val(2))
ERROR: UndefRefError: access to undefined reference
Stacktrace:
 [1] getproperty(x::FastTransforms.ChebyshevTransformPlan{BigFloat, 2, true, Nothing}, f::Symbol)
   @ Base ./Base.jl:33
 [2] *(P::FastTransforms.ChebyshevTransformPlan{BigFloat, 2, true, Nothing}, x::Vector{BigFloat})
   @ FastTransforms ~/.julia/dev/FastTransforms/src/chebyshevtransform.jl:70
 [3] chebyshevtransform!(x::Vector{BigFloat}, kind::Val{2})
   @ FastTransforms ~/.julia/dev/FastTransforms/src/chebyshevtransform.jl:78
 [4] chebyshevtransform(x::Vector{BigFloat}, kind::Val{2})
   @ FastTransforms ~/.julia/dev/FastTransforms/src/chebyshevtransform.jl:88
 [5] top-level scope
   @ REPL[19]:1
jishnub commented 2 years ago

Related:

julia> F = FastTransforms.plan_chebyshevtransform(rand(BigFloat, 4))
FastTransforms.ChebyshevTransformPlan{BigFloat, 1, Nothing, false, 1, UnitRange{Int64}}(#undef)

julia> F.plan
ERROR: UndefRefError: access to undefined reference
Stacktrace:
 [1] getproperty(x::FastTransforms.ChebyshevTransformPlan{BigFloat, 1, Nothing, false, 1, UnitRange{Int64}}, f::Symbol)
   @ Base ./Base.jl:38
 [2] top-level scope
   @ REPL[110]:1

The constructor should wrap a plan, I guess?

dlfivefifty commented 2 years ago

F.plan shouldn't work because its not defined on purpose. What's missing is overloads of * that reduce to FFT calls a la:

https://github.com/JuliaApproximation/FastTransforms.jl/blob/8be10bf3662309f6704f9823fc243e7e65e8ac33/src/chebyshevtransform.jl#L669