Skip to content
Open
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,7 +1,7 @@
name = "ClassicalOrthogonalPolynomials"
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
authors = ["Sheehan Olver <solver@mac.com>"]
version = "0.15"
version = "0.15.1"


[deps]
Expand Down
3 changes: 2 additions & 1 deletion src/ClassicalOrthogonalPolynomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export OrthogonalPolynomial, Normalized, LanczosPolynomial,
WeightedUltraspherical, WeightedChebyshev, WeightedChebyshevT, WeightedChebyshevU, WeightedJacobi,
∞, Derivative, .., Inclusion,
chebyshevt, chebyshevu, legendre, jacobi, ultraspherical,
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh, normalizedjacobip,
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh,
normalizedlegendrep, normalizedjacobip, normalizedultrasphericalc, normalizedlaguerrel, normalizedhermiteh,
jacobimatrix, jacobiweight, legendreweight, chebyshevtweight, chebyshevuweight, Weighted, PiecewiseInterlace, plan_transform,
expand, transform

Expand Down
8 changes: 8 additions & 0 deletions src/classical/hermite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ respec to `exp(-x^2)`, at `z`.
"""
hermiteh(n::Integer, z) = Base.unsafe_getindex(Hermite{polynomialtype(typeof(z))}(), z, n+1)

"""
normalizedhermiteh(n, z)

computes the normalized `n`-th Hermite polynomial, orthogonal with
respec to `exp(-x^2)`, at `z`.
"""
normalizedhermiteh(n::Integer, z) = Base.unsafe_getindex(Normalized(Hermite{polynomialtype(typeof(z))}()), z, n+1)

broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), ::HermiteWeight{T}, ::Hermite{V}) where {T,V} = Weighted(Hermite{promote_type(T,V)}())

# H_{n+1} = 2x H_n - 2n H_{n-1}
Expand Down
16 changes: 16 additions & 0 deletions src/classical/laguerre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ respec to `exp(-x)`, at `z`.
"""
laguerrel(n::Integer, z::Number) = laguerrel(n, 0, z)

"""
normalizedlaguerrel(n, α, z)

computes the normalized `n`-th generalized Laguerre polynomial, orthogonal with
respec to `x^α * exp(-x)`, at `z`.
"""
normalizedlaguerrel(n::Integer, α, z::Number) = Base.unsafe_getindex(Normalized(Laguerre{polynomialtype(typeof(α), typeof(z))}(α)), z, n+1)

"""
normalizedlaguerrel(n, z)

computes the normalized `n`-th Laguerre polynomial, orthogonal with
respec to `exp(-x)`, at `z`.
"""
normalizedlaguerrel(n::Integer, z::Number) = normalizedlaguerrel(n, 0, z)


# L_{n+1} = (-1/(n+1) x + (2n+α+1)/(n+1)) L_n - (n+α)/(n+1) L_{n-1}
# - (n+α) L_{n-1} + (2n+α+1)* L_n -(n+1) L_{n+1} = x L_n
Expand Down
9 changes: 9 additions & 0 deletions src/classical/legendre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ computes the `n`-th Legendre polynomial at `z`.
"""
legendrep(n::Integer, z) = Base.unsafe_getindex(Legendre{typeof(z)}(), z, n+1)

"""
normalizedlegendrep(n, z)

computes the normalized `n`-th Legendre polynomial at `z`.
"""
normalizedlegendrep(n::Integer, z) = Base.unsafe_getindex(Normalized(Legendre{typeof(z)}()), z, n+1)




show(io::IO, w::Legendre{Float64}) = summary(io, w)
summary(io::IO, ::Legendre{Float64}) = print(io, "Legendre()")
Expand Down
1 change: 1 addition & 0 deletions src/classical/ultraspherical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const WeightedUltraspherical{T} = WeightedBasis{T,<:UltrasphericalWeight,<:Ultra

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

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

Expand Down