Skip to content

Complex Ultraspherical operators #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ApproxFunOrthogonalPolynomials"
uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
version = "0.6.29"
version = "0.6.30"

[deps]
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
Expand Down
5 changes: 4 additions & 1 deletion src/Spaces/Ultraspherical/UltrasphericalOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ recβ(::Type{T},S::Ultraspherical,k) where {T} = k/(2*(k-one(T)+order(S))) # o
recγ(::Type{T},S::Ultraspherical,k) where {T} = (k-2+2order(S))/(2*(k-one(T)+order(S))) # one(T) ensures we get correct type


normalization(::Type{T}, sp::Ultraspherical, k::Int) where T = (λ = order(sp); (T(2)^(1-2λ)*π)/((k+λ)*gamma(λ)^2*FastTransforms.Λ(T(k),one(λ),2λ)))
function normalization(::Type{T}, sp::Ultraspherical, k::Int) where T
λ = order(sp)
T(2)^(1-2λ)*π/((k+λ)*gamma(λ)^2*FastTransforms.Λ(real(T(k)),one(λ),2λ))
end

## Multiplication
# these are special cases
Expand Down
7 changes: 7 additions & 0 deletions test/UltrasphericalTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ using HalfIntegers
@test g ≈ Fun(ff, Ultraspherical(n1))
end
end

@testset "complex normalization" begin
C = Conversion(NormalizedUltraspherical(NormalizedLegendre()), Ultraspherical(Legendre()))
CC = convert(Operator{ComplexF64}, C)
@test CC isa Operator{ComplexF64}
@test CC[1:4, 1:4] ≈ C[1:4, 1:4]
end
end

@testset "Normalized space" begin
Expand Down