Skip to content

Commit 9e9f05e

Browse files
committed
Add normalized OP functions
1 parent 01eecab commit 9e9f05e

File tree

6 files changed

+37
-2
lines changed

6 files changed

+37
-2
lines changed

Project.toml

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

66

77
[deps]

src/ClassicalOrthogonalPolynomials.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export OrthogonalPolynomial, Normalized, LanczosPolynomial,
5454
WeightedUltraspherical, WeightedChebyshev, WeightedChebyshevT, WeightedChebyshevU, WeightedJacobi,
5555
∞, Derivative, .., Inclusion,
5656
chebyshevt, chebyshevu, legendre, jacobi, ultraspherical,
57-
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh, normalizedjacobip,
57+
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh,
58+
normalizedlegendrep, normalizedjacobip, normalizedultrasphericalc, normalizedlaguerrel, normalizedhermiteh,
5859
jacobimatrix, jacobiweight, legendreweight, chebyshevtweight, chebyshevuweight, Weighted, PiecewiseInterlace, plan_transform,
5960
expand, transform
6061

src/classical/hermite.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ respec to `exp(-x^2)`, at `z`.
4848
"""
4949
hermiteh(n::Integer, z) = Base.unsafe_getindex(Hermite{polynomialtype(typeof(z))}(), z, n+1)
5050

51+
"""
52+
normalizedhermiteh(n, z)
53+
54+
computes the normalized `n`-th Hermite polynomial, orthogonal with
55+
respec to `exp(-x^2)`, at `z`.
56+
"""
57+
normalizedhermiteh(n::Integer, z) = Base.unsafe_getindex(Normalized(Hermite{polynomialtype(typeof(z))}()), z, n+1)
58+
5159
broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), ::HermiteWeight{T}, ::Hermite{V}) where {T,V} = Weighted(Hermite{promote_type(T,V)}())
5260

5361
# H_{n+1} = 2x H_n - 2n H_{n-1}

src/classical/laguerre.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ respec to `exp(-x)`, at `z`.
5555
"""
5656
laguerrel(n::Integer, z::Number) = laguerrel(n, 0, z)
5757

58+
"""
59+
normalizedlaguerrel(n, α, z)
60+
61+
computes the normalized `n`-th generalized Laguerre polynomial, orthogonal with
62+
respec to `x^α * exp(-x)`, at `z`.
63+
"""
64+
normalizedlaguerrel(n::Integer, α, z::Number) = Base.unsafe_getindex(Normalized(Laguerre{polynomialtype(typeof(α), typeof(z))}(α)), z, n+1)
65+
66+
"""
67+
normalizedlaguerrel(n, z)
68+
69+
computes the normalized `n`-th Laguerre polynomial, orthogonal with
70+
respec to `exp(-x)`, at `z`.
71+
"""
72+
normalizedlaguerrel(n::Integer, z::Number) = normalizedlaguerrel(n, 0, z)
73+
5874

5975
# L_{n+1} = (-1/(n+1) x + (2n+α+1)/(n+1)) L_n - (n+α)/(n+1) L_{n-1}
6076
# - (n+α) L_{n-1} + (2n+α+1)* L_n -(n+1) L_{n+1} = x L_n

src/classical/legendre.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,15 @@ computes the `n`-th Legendre polynomial at `z`.
167167
"""
168168
legendrep(n::Integer, z) = Base.unsafe_getindex(Legendre{typeof(z)}(), z, n+1)
169169

170+
"""
171+
normalizedlegendrep(n, z)
172+
173+
computes the normalized `n`-th Legendre polynomial at `z`.
174+
"""
175+
normalizedlegendrep(n::Integer, z) = Base.unsafe_getindex(Normalized(Legendre{typeof(z)}()), z, n+1)
176+
177+
178+
170179

171180
show(io::IO, w::Legendre{Float64}) = summary(io, w)
172181
summary(io::IO, ::Legendre{Float64}) = print(io, "Legendre()")

src/classical/ultraspherical.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const WeightedUltraspherical{T} = WeightedBasis{T,<:UltrasphericalWeight,<:Ultra
5454

5555
orthogonalityweight(C::Ultraspherical) = UltrasphericalWeight(C.λ)
5656

57+
normalizedultrasphericalc(n::Integer, λ, z) = Base.unsafe_getindex(Normalized(Ultraspherical{polynomialtype(typeof(λ),typeof(z))}(λ)), z, n+1)
5758
ultrasphericalc(n::Integer, λ, z) = Base.unsafe_getindex(Ultraspherical{polynomialtype(typeof(λ),typeof(z))}(λ), z, n+1)
5859
ultraspherical(λ, d::AbstractInterval{T}) where T = Ultraspherical{float(promote_type(eltype(λ),T))}(λ)[affine(d,ChebyshevInterval{T}()), :]
5960

0 commit comments

Comments
 (0)