Skip to content

Commit f642f68

Browse files
authored
Complex Ultraspherical operators (#252)
* complex Ultraspherical operators * version bump to v0.6.30
1 parent a754c49 commit f642f68

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunOrthogonalPolynomials"
22
uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
3-
version = "0.6.29"
3+
version = "0.6.30"
44

55
[deps]
66
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"

src/Spaces/Ultraspherical/UltrasphericalOperators.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ recβ(::Type{T},S::Ultraspherical,k) where {T} = k/(2*(k-one(T)+order(S))) # o
1313
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
1414

1515

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

1821
## Multiplication
1922
# these are special cases

test/UltrasphericalTest.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ using HalfIntegers
107107
@test g Fun(ff, Ultraspherical(n1))
108108
end
109109
end
110+
111+
@testset "complex normalization" begin
112+
C = Conversion(NormalizedUltraspherical(NormalizedLegendre()), Ultraspherical(Legendre()))
113+
CC = convert(Operator{ComplexF64}, C)
114+
@test CC isa Operator{ComplexF64}
115+
@test CC[1:4, 1:4] C[1:4, 1:4]
116+
end
110117
end
111118

112119
@testset "Normalized space" begin

0 commit comments

Comments
 (0)