Skip to content

Commit fdc8fe0

Browse files
authored
Relax Ultraspherical ConcreteConversion order types (#217)
* Relax Ultraspherical ConcreteConversion order types * union of tuples in bandwidths * Disable CI on Windows
1 parent 2832519 commit fdc8fe0

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
os:
4343
- ubuntu-latest
4444
- macOS-latest
45-
- windows-latest
45+
# - windows-latest
4646
arch:
4747
- x64
4848
steps:

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.18"
3+
version = "0.6.19"
44

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

src/Spaces/Jacobi/Jacobi.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct Jacobi{D<:Domain,R,T} <: PolynomialSpace{D,R}
99
b::T
1010
a::T
1111
domain::D
12-
Jacobi{D,R}(b::T,a::T,d::D) where {D,R,T} = new{D,R,T}(b,a,d)
12+
Jacobi{D,R}(b::T,a::T,d::D) where {D,R,T<:Number} = new{D,R,T}(b,a,d)
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)

src/Spaces/Ultraspherical/UltrasphericalOperators.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,19 @@ end
247247
bandwidths(C::ConcreteConversion{<:Chebyshev,<:Ultraspherical{<:Union{Integer,StaticInt}}}) = 0,2 # order == 1
248248
bandwidths(C::ConcreteConversion{<:Ultraspherical{<:Union{Integer,StaticInt}},<:Ultraspherical{<:Union{Integer,StaticInt}}}) = 0,2
249249

250-
bandwidths(C::ConcreteConversion{<:Chebyshev,<:Ultraspherical}) =
251-
0,order(rangespace(C))==1 ? 2 : ℵ₀
252-
bandwidths(C::ConcreteConversion{<:Ultraspherical,<:Chebyshev}) =
253-
0,order(domainspace(C))==1 ? 2 : ℵ₀
250+
function bandwidths(C::ConcreteConversion{<:Chebyshev,<:Ultraspherical})
251+
orderone = order(rangespace(C)) == 1
252+
orderone ? (0,2) : (0,ℵ₀)
253+
end
254+
function bandwidths(C::ConcreteConversion{<:Ultraspherical,<:Chebyshev})
255+
orderone = order(domainspace(C)) == 1
256+
orderone ? (0,2) : (0,ℵ₀)
257+
end
254258

255-
bandwidths(C::ConcreteConversion{<:Ultraspherical,<:Ultraspherical}) =
256-
0,order(domainspace(C))+1==order(rangespace(C)) ? 2 : ℵ₀
259+
function bandwidths(C::ConcreteConversion{<:Ultraspherical,<:Ultraspherical})
260+
offbyone = order(domainspace(C))+1 == order(rangespace(C))
261+
offbyone ? (0,2) : (0,ℵ₀)
262+
end
257263

258264
Base.stride(C::ConcreteConversion{<:Chebyshev,<:Ultraspherical{<:Union{Integer,StaticInt}}}) = 2
259265
Base.stride(C::ConcreteConversion{<:Ultraspherical,<:Ultraspherical}) = 2

src/fastops.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
# Conversions
1111
#####
1212

13-
function BandedMatrix(S::SubOperator{T,ConcreteConversion{Chebyshev{DD,RR},Ultraspherical{Int,DD,RR},T},
14-
NTuple{2,UnitRange{Int}}}) where {T,DD,RR}
13+
function BandedMatrix(S::SubOperator{T,ConcreteConversion{Chebyshev{DD,RR},
14+
Ultraspherical{LT,DD,RR},T},
15+
NTuple{2,UnitRange{Int}}}) where {T,LT<:Union{Integer, StaticInt},DD,RR}
1516
# we can assume order is 1
1617
ret = BandedMatrix{eltype(S)}(undef, size(S), bandwidths(S))
1718
kr,jr = parentindices(S)
@@ -31,8 +32,8 @@ function BandedMatrix(S::SubOperator{T,ConcreteConversion{Chebyshev{DD,RR},Ultra
3132
ret
3233
end
3334

34-
function BandedMatrix(V::SubOperator{T,ConcreteConversion{Ultraspherical{LT,DD,RR},Ultraspherical{LT,DD,RR},T},
35-
NTuple{2,UnitRange{Int}}}) where {T,LT,DD,RR}
35+
function BandedMatrix(V::SubOperator{T,ConcreteConversion{Ultraspherical{LT1,DD,RR},Ultraspherical{LT2,DD,RR},T},
36+
NTuple{2,UnitRange{Int}}}) where {T,LT1,LT2,DD,RR}
3637

3738
n,m = size(V)
3839
V_l, V_u = bandwidths(V)

0 commit comments

Comments
 (0)