Skip to content

use NTuple{2,UnitRange{Int}} #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2023
Merged
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,6 +1,6 @@
name = "ApproxFunOrthogonalPolynomials"
uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
version = "0.6.14"
version = "0.6.15"

[deps]
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
Expand Down
4 changes: 2 additions & 2 deletions src/Spaces/Chebyshev/ChebyshevOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function getindex(op::ConcreteDirichlet{<:Chebyshev},
end

function Matrix(S::SubOperator{T,ConcreteDirichlet{C,V,T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {C<:Chebyshev,V,T}
NTuple{2,UnitRange{Int}}}) where {C<:Chebyshev,V,T}
ret = Array{T}(undef, size(S)...)
kr,jr = parentindices(S)
isempty(kr) && return ret
Expand Down Expand Up @@ -181,7 +181,7 @@ getindex(M::ConcreteMultiplication{C,PS,T},k::Integer,j::Integer) where {PS<:Pol
M[k:k,j:j][1,1]


function BandedMatrix(S::SubOperator{T,ConcreteMultiplication{C,C,T},Tuple{UnitRange{Int},UnitRange{Int}}}) where {C<:Chebyshev,T}
function BandedMatrix(S::SubOperator{T,ConcreteMultiplication{C,C,T},NTuple{2,UnitRange{Int}}}) where {C<:Chebyshev,T}
ret = BandedMatrix(Zeros, S)

kr,jr=parentindices(S)
Expand Down
2 changes: 1 addition & 1 deletion src/Spaces/PolynomialSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function jac_gbmm!(α, J, B, β, C, b, valJ, valBC)
end

function BandedMatrix(S::SubOperator{T,ConcreteMultiplication{C,PS,T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {PS<:PolynomialSpace,T,C<:PolynomialSpace}
NTuple{2,UnitRange{Int}}}) where {PS<:PolynomialSpace,T,C<:PolynomialSpace}
M=parent(S)
kr,jr=parentindices(S)
f=M.f
Expand Down
2 changes: 1 addition & 1 deletion src/Spaces/Ultraspherical/ContinuousSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ end


function BlockBandedMatrix(S::SubOperator{T,<:ConcreteDirichlet{<:TensorChebyshevDirichlet},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {T}
NTuple{2,UnitRange{Int}}}) where {T}
P=parent(S)
ret=BlockBandedMatrix(Zeros, S)
kr,jr=parentindices(S)
Expand Down
8 changes: 4 additions & 4 deletions src/fastops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#####

function BandedMatrix(S::SubOperator{T,ConcreteConversion{Chebyshev{DD,RR},Ultraspherical{Int,DD,RR},T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {T,DD,RR}
NTuple{2,UnitRange{Int}}}) where {T,DD,RR}
# we can assume order is 1
ret = BandedMatrix{eltype(S)}(undef, size(S), bandwidths(S))
kr,jr = parentindices(S)
Expand All @@ -32,7 +32,7 @@ function BandedMatrix(S::SubOperator{T,ConcreteConversion{Chebyshev{DD,RR},Ultra
end

function BandedMatrix(V::SubOperator{T,ConcreteConversion{Ultraspherical{LT,DD,RR},Ultraspherical{LT,DD,RR},T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {T,LT,DD,RR}
NTuple{2,UnitRange{Int}}}) where {T,LT,DD,RR}

n,m = size(V)
V_l, V_u = bandwidths(V)
Expand Down Expand Up @@ -66,7 +66,7 @@ end


function BandedMatrix(S::SubOperator{T,ConcreteDerivative{Chebyshev{DD,RR},K,T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {T,K,DD,RR}
NTuple{2,UnitRange{Int}}}) where {T,K,DD,RR}

n,m = size(S)
ret = BandedMatrix{eltype(S)}(undef, (n,m), bandwidths(S))
Expand All @@ -92,7 +92,7 @@ end


function BandedMatrix(S::SubOperator{T,ConcreteDerivative{Ultraspherical{LT,DD,RR},K,T},
Tuple{UnitRange{Int},UnitRange{Int}}}) where {T,K,DD,RR,LT}
NTuple{2,UnitRange{Int}}}) where {T,K,DD,RR,LT}
n,m = size(S)
ret = BandedMatrix{eltype(S)}(undef, (n,m), bandwidths(S))
kr,jr = parentindices(S)
Expand Down