1818end
1919
2020
21- rangespace (D:: ConcreteDerivative{J} ) where {J <: Jacobi }= Jacobi (D. space. b+ D. order,D. space. a+ D. order,domain (D))
22- bandwidths (D:: ConcreteDerivative{J} ) where {J <: Jacobi }= - D. order,D. order
21+ rangespace (D:: ConcreteDerivative{<:Jacobi} ) = Jacobi (D. space. b+ D. order,D. space. a+ D. order,domain (D))
22+ bandwidths (D:: ConcreteDerivative{<:Jacobi} ) = - D. order,D. order
2323
24- getindex (T:: ConcreteDerivative{J} , k:: Integer ,j:: Integer ) where {J <: Jacobi } =
24+ getindex (T:: ConcreteDerivative{<:Jacobi} , k:: Integer , j:: Integer ) =
2525 j== k+ 1 ? eltype (T)((k+ 1 + T. space. a+ T. space. b)/ complexlength (domain (T))) : zero (eltype (T))
2626
2727
@@ -57,10 +57,10 @@ function Integral(J::Jacobi,k::Number)
5757end
5858
5959
60- rangespace (D:: ConcreteIntegral{J} ) where {J <: Jacobi }= Jacobi (D. space. b- D. order,D. space. a- D. order,domain (D))
61- bandwidths (D:: ConcreteIntegral{J} ) where {J <: Jacobi }= D. order,0
60+ rangespace (D:: ConcreteIntegral{<:Jacobi} ) = Jacobi (D. space. b- D. order,D. space. a- D. order,domain (D))
61+ bandwidths (D:: ConcreteIntegral{<:Jacobi} ) = D. order,0
6262
63- function getindex (T:: ConcreteIntegral{J} , k:: Integer ,j:: Integer ) where J <: Jacobi
63+ function getindex (T:: ConcreteIntegral{<:Jacobi} , k:: Integer , j:: Integer )
6464 @assert T. order== 1
6565 if k≥ 2 && j== k- 1
6666 complexlength (domain (T))./ (k+ T. space. a+ T. space. b- 2 )
@@ -80,7 +80,7 @@ function Volterra(S::Jacobi, order::Integer)
8080end
8181
8282rangespace (V:: ConcreteVolterra{J} ) where {J<: Jacobi }= Jacobi (- 1.0 ,0.0 ,domain (V))
83- bandwidths (V :: ConcreteVolterra{J} ) where {J <: Jacobi }= 1 ,0
83+ bandwidths (:: ConcreteVolterra{<:Jacobi} ) = 1 ,0
8484
8585function getindex (V:: ConcreteVolterra{J} ,k:: Integer ,j:: Integer ) where J<: Jacobi
8686 d= domain (V)
@@ -141,32 +141,36 @@ function Conversion(L::Jacobi,M::Jacobi)
141141
142142 if isapproxinteger (L. a- M. a) && isapproxinteger (L. b- M. b)
143143 dm= domain (M)
144- D= typeof (dm)
145144 if isapprox (M. a,L. a) && isapprox (M. b,L. b)
146145 ConversionWrapper (Operator (I,L))
147- elseif (isapprox (M. b,L. b+ 1 ) && isapprox (M. a,L. a)) || (isapprox (M. b,L. b) && isapprox (M. a,L. a+ 1 ))
146+ elseif (isapprox (M. b,L. b+ static (1 )) && isapprox (M. a,L. a)) ||
147+ (isapprox (M. b,L. b) && isapprox (M. a,L. a+ static (1 )))
148148 ConcreteConversion (L,M)
149- elseif M. b > L. b+ 1
150- ConversionWrapper (TimesOperator (Conversion (Jacobi (M. b- 1 ,M. a,dm),M),Conversion (L,Jacobi (M. b- 1 ,M. a,dm))))
149+ elseif M. b > L. b+ static (1 )
150+ ConversionWrapper (
151+ TimesOperator (
152+ Conversion (Jacobi (M. b- static (1 ),M. a,dm),M),
153+ Conversion (L,Jacobi (M. b- static (1 ),M. a,dm))))
151154 else # if M.a >= L.a+1
152- ConversionWrapper (TimesOperator (Conversion (Jacobi (M. b,M. a- 1 ,dm),M),Conversion (L,Jacobi (M. b,M. a- 1 ,dm))))
155+ ConversionWrapper (
156+ TimesOperator (
157+ Conversion (Jacobi (M. b,M. a- static (1 ),dm),M),
158+ Conversion (L,Jacobi (M. b,M. a- static (1 ),dm))))
153159 end
154- elseif L. a ≈ L. b ≈ 0. && M. a ≈ M. b ≈ 0.5
160+ elseif L. a ≈ L. b ≈ 0 && M. a ≈ M. b ≈ 0.5
155161 Conversion (L,Ultraspherical (L),Ultraspherical (M),M)
156- elseif L. a ≈ L. b ≈ 0. && M. a ≈ M. b ≈ - 0.5
162+ elseif L. a ≈ L. b ≈ 0 && M. a ≈ M. b ≈ - 0.5
157163 Conversion (L,Ultraspherical (L),Chebyshev (M),M)
158- elseif L. a ≈ L. b ≈ - 0.5 && M. a ≈ M. b ≈ 0.5
159- Conversion (L,Chebyshev (L),Ultraspherical (M),M)
160164 else # L.a - M.a ≈ L.b - M.b
161165 error (" Implement for $L → $M " )
162166 end
163167end
164168
165- bandwidths (C :: ConcreteConversion{J1,J2} ) where {J1 <: Jacobi ,J2 <: Jacobi }= (0 ,1 )
169+ bandwidths (:: ConcreteConversion{<:Jacobi,<:Jacobi} ) = (0 ,1 )
166170
167171
168172
169- function Base. getindex (C:: ConcreteConversion{J1,J2 ,T} ,k:: Integer ,j:: Integer ) where {J1 <: Jacobi ,J2 <: Jacobi , T}
173+ function Base. getindex (C:: ConcreteConversion{<:Jacobi,<:Jacobi ,T} ,k:: Integer ,j:: Integer ) where {T}
170174 L= C. domainspace
171175 if L. b+ 1 == C. rangespace. b
172176 if j== k
@@ -220,7 +224,8 @@ function Conversion(A::Jacobi,B::PolynomialSpace)
220224end
221225
222226isequalminhalf (x) = x == - 0.5
223- isequalminhalf (:: Integer ) = false
227+ isequalminhalf (@nospecialize :: Integer ) = false
228+ isequalminhalf (@nospecialize :: StaticInt ) = false
224229
225230function Conversion (A:: Jacobi ,B:: Chebyshev )
226231 if isequalminhalf (A. a) && isequalminhalf (A. b)
@@ -300,23 +305,23 @@ end
300305
301306
302307
303- bandwidths (C :: ConcreteConversion{US,J} ) where {US <: Chebyshev ,J <: Jacobi } = 0 ,0
304- bandwidths (C :: ConcreteConversion{J,US} ) where {US <: Chebyshev ,J <: Jacobi } = 0 ,0
308+ bandwidths (:: ConcreteConversion{<:Chebyshev,<:Jacobi} ) = 0 ,0
309+ bandwidths (:: ConcreteConversion{<:Jacobi,<:Chebyshev} ) = 0 ,0
305310
306311
307- bandwidths (C :: ConcreteConversion{US,J} ) where {US <: Ultraspherical ,J <: Jacobi } = 0 ,0
308- bandwidths (C :: ConcreteConversion{J,US} ) where {US <: Ultraspherical ,J <: Jacobi } = 0 ,0
312+ bandwidths (:: ConcreteConversion{<:Ultraspherical,<:Jacobi} ) = 0 ,0
313+ bandwidths (:: ConcreteConversion{<:Jacobi,<:Ultraspherical} ) = 0 ,0
309314
310315# TODO : Figure out how to unify these definitions
311- function getindex (C :: ConcreteConversion{CC,J ,T} ,k:: Integer ,j:: Integer ) where {J <: Jacobi ,CC <: Chebyshev , T}
316+ function getindex (:: ConcreteConversion{<:Chebyshev,<:Jacobi ,T} , k:: Integer , j:: Integer ) where {T}
312317 if j== k
313318 one (T)/ jacobip (T,k- 1 ,- one (T)/ 2 ,- one (T)/ 2 ,one (T))
314319 else
315320 zero (T)
316321 end
317322end
318323
319- function BandedMatrix (S:: SubOperator{T,ConcreteConversion{CC,J,T},Tuple{UnitRange{Int} ,UnitRange{Int}}} ) where {J<: Jacobi ,CC<: Chebyshev ,T}
324+ function BandedMatrix (S:: SubOperator{T,ConcreteConversion{CC,J,T},NTuple{2 ,UnitRange{Int}}} ) where {J<: Jacobi ,CC<: Chebyshev ,T}
320325 ret= BandedMatrix (Zeros, S)
321326 kr,jr = parentindices (S)
322327 k= (kr ∩ jr)
@@ -328,15 +333,15 @@ function BandedMatrix(S::SubOperator{T,ConcreteConversion{CC,J,T},Tuple{UnitRang
328333end
329334
330335
331- function getindex (C :: ConcreteConversion{J,CC ,T} ,k:: Integer ,j:: Integer ) where {J <: Jacobi ,CC <: Chebyshev , T}
336+ function getindex (:: ConcreteConversion{<:Jacobi,<:Chebyshev ,T} , k:: Integer , j:: Integer ) where {T}
332337 if j== k
333338 jacobip (T,k- 1 ,- one (T)/ 2 ,- one (T)/ 2 ,one (T))
334339 else
335340 zero (T)
336341 end
337342end
338343
339- function BandedMatrix (S:: SubOperator{T,ConcreteConversion{J,CC,T},Tuple{UnitRange{Int} ,UnitRange{Int}}} ) where {J<: Jacobi ,CC<: Chebyshev ,T}
344+ function BandedMatrix (S:: SubOperator{T,ConcreteConversion{J,CC,T},NTuple{2 ,UnitRange{Int}}} ) where {J<: Jacobi ,CC<: Chebyshev ,T}
340345 ret= BandedMatrix (Zeros, S)
341346 kr,jr = parentindices (S)
342347 k= (kr ∩ jr)
@@ -348,7 +353,7 @@ function BandedMatrix(S::SubOperator{T,ConcreteConversion{J,CC,T},Tuple{UnitRang
348353end
349354
350355
351- function getindex (C:: ConcreteConversion{US,J ,T} ,k:: Integer ,j:: Integer ) where {US <: Ultraspherical ,J <: Jacobi , T}
356+ function getindex (C:: ConcreteConversion{<:Ultraspherical,<:Jacobi ,T} , k:: Integer , j:: Integer ) where {T}
352357 if j== k
353358 S= rangespace (C)
354359 jp= jacobip (T,k- 1 ,S. a,S. b,one (T))
@@ -359,7 +364,7 @@ function getindex(C::ConcreteConversion{US,J,T},k::Integer,j::Integer) where {US
359364 end
360365end
361366
362- function BandedMatrix (S:: SubOperator{T,ConcreteConversion{US,J,T},Tuple{UnitRange{Int} ,UnitRange{Int}}} ) where {US<: Ultraspherical ,J<: Jacobi ,T}
367+ function BandedMatrix (S:: SubOperator{T,ConcreteConversion{US,J,T},NTuple{2 ,UnitRange{Int}}} ) where {US<: Ultraspherical ,J<: Jacobi ,T}
363368 ret= BandedMatrix (Zeros, S)
364369 kr,jr = parentindices (S)
365370 k= (kr ∩ jr)
375380
376381
377382
378- function getindex (C:: ConcreteConversion{J,US ,T} ,k:: Integer ,j:: Integer ) where {US <: Ultraspherical ,J <: Jacobi , T}
383+ function getindex (C:: ConcreteConversion{<:Jacobi,<:Ultraspherical ,T} , k:: Integer , j:: Integer ) where {T}
379384 if j== k
380385 S= domainspace (C)
381386 jp= jacobip (T,k- 1 ,S. a,S. b,one (T))
@@ -386,7 +391,7 @@ function getindex(C::ConcreteConversion{J,US,T},k::Integer,j::Integer) where {US
386391 end
387392end
388393
389- function BandedMatrix (S:: SubOperator{T,ConcreteConversion{J,US,T},Tuple{UnitRange{Int} ,UnitRange{Int}}} ) where {US<: Ultraspherical ,J<: Jacobi ,T}
394+ function BandedMatrix (S:: SubOperator{T,ConcreteConversion{J,US,T},NTuple{2 ,UnitRange{Int}}} ) where {US<: Ultraspherical ,J<: Jacobi ,T}
390395 ret= BandedMatrix (Zeros, S)
391396 kr,jr = parentindices (S)
392397 k= (kr ∩ jr)
403408
404409isapproxminhalf (a) = a ≈ - 0.5
405410isapproxminhalf (:: Integer ) = false
411+ isapproxminhalf (@nospecialize :: StaticInt ) = false
406412
407413function union_rule (A:: Jacobi ,B:: Jacobi )
408414 if domainscompatible (A,B)
0 commit comments