Skip to content

Commit 8a8109f

Browse files
authored
Remove explicit static-handling methods in Jacobi (#202)
* remove static as a dep * reintroduce dep
1 parent 637bbb0 commit 8a8109f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/Spaces/Jacobi/Jacobi.jl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,16 @@ struct Jacobi{D<:Domain,R,T} <: PolynomialSpace{D,R}
1313
end
1414
Jacobi(b::T,a::T,d::Domain) where {T<:Number} =
1515
Jacobi{typeof(d),promote_type(T,real(prectype(d)))}(b, a, d)
16-
Legendre(domain) = Jacobi(0,0,domain)
17-
Legendre() = Legendre(ChebyshevInterval())
18-
Jacobi(b::Number,a::Number,d::Domain) = Jacobi(promote(dynamic(b), dynamic(a))...,d)
19-
Jacobi(b::Number,a::Number,d) = Jacobi(b,a,Domain(d))
20-
Jacobi(b::Number,a::Number) = Jacobi(b,a,ChebyshevInterval())
16+
Legendre(domain = ChebyshevInterval()) = Jacobi(0,0,Domain(domain)::Domain)
17+
Jacobi(b::Number,a::Number,d=ChebyshevInterval()) = Jacobi(promote(b, a)..., Domain(d)::Domain)
2118
Jacobi(A::Ultraspherical) = Jacobi(order(A)-0.5,order(A)-0.5,domain(A))
2219
Jacobi(A::Chebyshev) = Jacobi(-0.5,-0.5,domain(A))
2320

2421
const NormalizedJacobi{D<:Domain,R,T} = NormalizedPolynomialSpace{Jacobi{D,R,T},D,R}
2522
NormalizedJacobi(s...) = NormalizedPolynomialSpace(Jacobi(s...))
2623
NormalizedLegendre(d...) = NormalizedPolynomialSpace(Legendre(d...))
2724

28-
normalization(::Type{T}, sp::Jacobi, k::Int) where T = FastTransforms.Anαβ(k, dynamic(sp.a), dynamic(sp.b))
25+
normalization(::Type{T}, sp::Jacobi, k::Int) where T = FastTransforms.Anαβ(k, sp.a, sp.b)
2926

3027
function Ultraspherical(J::Jacobi)
3128
if J.a == J.b
@@ -54,7 +51,7 @@ function canonicalspace(S::Jacobi)
5451
Chebyshev(domain(S))
5552
else
5653
# return space with parameters in (-1,0.]
57-
Jacobi(mod(dynamic(S.b),-1),mod(dynamic(S.a),-1),domain(S))
54+
Jacobi(mod(S.b,-1),mod(S.a,-1),domain(S))
5855
end
5956
end
6057

@@ -121,8 +118,8 @@ jacobip(r::AbstractRange,α,β,x::Number) = jacobip(promote_type(typeof(α),type
121118

122119
jacobip(::Type{T},n::Integer,α,β,v) where {T} = jacobip(T,n:n,α,β,v)[1]
123120
jacobip(n::Integer,α,β,v) = jacobip(n:n,α,β,v)[1]
124-
jacobip(::Type{T},n,S::Jacobi,v) where {T} = jacobip(T,n,dynamic(S.a),dynamic(S.b),v)
125-
jacobip(n,S::Jacobi,v) = jacobip(n,dynamic(S.a),dynamic(S.b),v)
121+
jacobip(::Type{T},n,S::Jacobi,v) where {T} = jacobip(T,n,S.a,S.b,v)
122+
jacobip(n,S::Jacobi,v) = jacobip(n,S.a,S.b,v)
126123

127124

128125

0 commit comments

Comments
 (0)