Skip to content

Commit e6a4cee

Browse files
authored
use NTuple{2,UnitRange{Int}} (#386)
1 parent f1b1402 commit e6a4cee

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/LinearAlgebra/RaggedMatrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ function axpy!(a, X::RaggedMatrix, Y::RaggedMatrix)
183183
Y
184184
end
185185

186-
colstop(X::SubArray{T,2,RaggedMatrix{T},Tuple{UnitRange{Int},UnitRange{Int}}},
186+
colstop(X::SubArray{T,2,RaggedMatrix{T},NTuple{2,UnitRange{Int}}},
187187
j::Integer) where {T} = min(colstop(parent(X),j + first(parentindices(X)[2])-1) -
188188
first(parentindices(X)[1]) + 1,
189189
size(X,1))
190190

191191
function axpy!(a,X::RaggedMatrix,
192-
Y::SubArray{T,2,RaggedMatrix{T},Tuple{UnitRange{Int},UnitRange{Int}}}) where T
192+
Y::SubArray{T,2,RaggedMatrix{T},NTuple{2,UnitRange{Int}}}) where T
193193
if size(X) size(Y)
194194
throw(BoundsError())
195195
end

src/Operators/Operator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ macro wrappergetindex(Wrap)
552552
ApproxFunBase.unwrap_axpy!(α,P,A)
553553

554554
ApproxFunBase.mul_coefficients(A::$Wrap,b) = ApproxFunBase.mul_coefficients(A.op,b)
555-
ApproxFunBase.mul_coefficients(A::ApproxFunBase.SubOperator{T,OP,Tuple{UnitRange{Int},UnitRange{Int}}},b) where {T,OP<:$Wrap} =
555+
ApproxFunBase.mul_coefficients(A::ApproxFunBase.SubOperator{T,OP,NTuple{2,UnitRange{Int}}},b) where {T,OP<:$Wrap} =
556556
ApproxFunBase.mul_coefficients(view(parent(A).op,S.indexes[1],S.indexes[2]),b)
557557
ApproxFunBase.mul_coefficients(A::ApproxFunBase.SubOperator{T,OP},b) where {T,OP<:$Wrap} =
558558
ApproxFunBase.mul_coefficients(view(parent(A).op,S.indexes[1],S.indexes[2]),b)

src/Operators/banded/ToeplitzOperator.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function toeplitz_getindex(cfs::AbstractVector{T},k::Integer,j::Integer) where T
5757
end
5858
end
5959

60-
function BandedMatrix(S::SubOperator{T,ToeplitzOperator{T},Tuple{UnitRange{Int},UnitRange{Int}}}) where T
60+
function BandedMatrix(S::SubOperator{T,ToeplitzOperator{T},NTuple{2,UnitRange{Int}}}) where T
6161
ret = BandedMatrix(Zeros, S)
6262

6363
kr,jr=parentindices(S)
@@ -121,7 +121,7 @@ getindex(T::HankelOperator,k::Integer,j::Integer) =
121121
hankel_getindex(T.coefficients,k,j)
122122

123123

124-
function BandedMatrix(S::SubOperator{T,HankelOperator{T},Tuple{UnitRange{Int},UnitRange{Int}}}) where T
124+
function BandedMatrix(S::SubOperator{T,HankelOperator{T},NTuple{2,UnitRange{Int}}}) where T
125125
ret=BandedMatrix(Zeros, S)
126126

127127
kr,jr=parentindices(S)

src/Operators/general/InterlaceOperator.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ for TYP in (:BandedMatrix, :BlockBandedMatrix, :BandedBlockBandedMatrix, :Ragged
332332
:Matrix)
333333
@eval begin
334334
function $TYP(S::SubOperator{T,InterlaceOperator{T,1,SS,PS,DI,RI,BI},
335-
Tuple{UnitRange{Int},UnitRange{Int}}}) where {SS,PS,DI,RI,BI,T}
335+
NTuple{2,UnitRange{Int}}}) where {SS,PS,DI,RI,BI,T}
336336
kr,jr=parentindices(S)
337337
L=parent(S)
338338

@@ -356,7 +356,7 @@ for TYP in (:BandedMatrix, :BlockBandedMatrix, :BandedBlockBandedMatrix, :Ragged
356356
end
357357

358358
function $TYP(S::SubOperator{T,InterlaceOperator{T,2,SS,PS,DI,RI,BI},
359-
Tuple{UnitRange{Int},UnitRange{Int}}}) where {SS,PS,DI,RI,BI,T}
359+
NTuple{2,UnitRange{Int}}}) where {SS,PS,DI,RI,BI,T}
360360
kr,jr=parentindices(S)
361361
L=parent(S)
362362

src/Operators/general/PartialInverseOperator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ end
109109

110110
## These are both hacks that apparently work
111111

112-
function BandedMatrix(S::SubOperator{T,<:PartialInverseOperator,Tuple{UnitRange{Int},UnitRange{Int}}}) where {T}
112+
function BandedMatrix(S::SubOperator{T,<:PartialInverseOperator,NTuple{2,UnitRange{Int}}}) where {T}
113113
kr,jr = parentindices(S)
114114
P = parent(S)
115115
#ret = BandedMatrix{eltype(S)}(undef, size(S), bandwidths(S))

src/PDE/KroneckerOperator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ Evaluation(sp::TensorSpace,x::Tuple) = Evaluation(sp,SVector(x...))
416416

417417

418418
# it's faster to build the operators to the last b
419-
function mul_coefficients(A::SubOperator{T,KKO,Tuple{UnitRange{Int},UnitRange{Int}}}, b) where {T,KKO<:KroneckerOperator}
419+
function mul_coefficients(A::SubOperator{T,KKO,NTuple{2,UnitRange{Int}}}, b) where {T,KKO<:KroneckerOperator}
420420
P = parent(A)
421421
kr,jr = parentindices(A)
422422
dt,rt = domaintensorizer(P),rangetensorizer(P)

src/Spaces/QuotientSpace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ for (gesdd, elty, relty) in ((:dgesdd_,:Float64,:Float64),
262262
end
263263

264264

265-
function BandedMatrix(S::SubOperator{T,ConcreteConversion{QuotientSpace{SP,O,D,R},SP,T},Tuple{UnitRange{Int},UnitRange{Int}}}) where {SP,O,D,R,T}
265+
function BandedMatrix(S::SubOperator{T,ConcreteConversion{QuotientSpace{SP,O,D,R},SP,T},NTuple{2,UnitRange{Int}}}) where {SP,O,D,R,T}
266266
kr,jr = parentindices(S)
267267
C = parent(S)
268268
#ret = BandedMatrix{eltype(S)}(undef, size(S), bandwidths(S))

0 commit comments

Comments
 (0)