Skip to content

Commit

Permalink
use NTuple{2,UnitRange{Int}} (#203)
Browse files Browse the repository at this point in the history
* use NTuple{2,UnitRange{Int}}

* version bump to v0.6.15
  • Loading branch information
jishnub authored Mar 1, 2023
1 parent aabc765 commit d6fdfea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
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

2 comments on commit d6fdfea

@jishnub
Copy link
Member Author

@jishnub jishnub commented on d6fdfea Mar 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/78744

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.15 -m "<description of version>" d6fdfea244c23de3b251cd8819e46f3675eae739
git push origin v0.6.15

Please sign in to comment.