Skip to content

Commit 076951c

Browse files
parametric typing for 0.4 0.5 compatibility
1 parent b78b96c commit 076951c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/ChebyshevJacobiPlan.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ function ChebyshevJacobiIndices{D,T}(α::T,β::T,CJC::ChebyshevJacobiConstants{D
5353
ChebyshevJacobiIndices(i₁,i₂,j₁,j₂)
5454
end
5555

56-
type ChebyshevJacobiPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
56+
type ChebyshevJacobiPlan{D,T,DCT,DST,SA} <: FastTransformPlan{D,T}
5757
CJC::ChebyshevJacobiConstants{D,T}
5858
CJI::ChebyshevJacobiIndices
5959
p₁::DCT
6060
p₂::DST
6161
rp::RecurrencePlan{T}
6262
c₁::Vector{T}
63-
c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1}
63+
c₂::SA
6464
um::Vector{T}
6565
vm::Vector{T}
6666
cfs::Matrix{T}
@@ -75,7 +75,7 @@ type ChebyshevJacobiPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
7575
anαβ::Vector{T}
7676
c_cheb2::Vector{T}
7777
pr::Vector{T}
78-
function ChebyshevJacobiPlan(CJC::ChebyshevJacobiConstants{D,T},CJI::ChebyshevJacobiIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1},um::Vector{T},vm::Vector{T},cfs::Matrix{T}::Vector{T},tempcos::Vector{T},tempsin::Vector{T},tempcosβsinα::Vector{T},tempmindices::Vector{T},cnαβ::Vector{T},cnmαβ::Vector{T})
78+
function ChebyshevJacobiPlan(CJC::ChebyshevJacobiConstants{D,T},CJI::ChebyshevJacobiIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SA,um::Vector{T},vm::Vector{T},cfs::Matrix{T}::Vector{T},tempcos::Vector{T},tempsin::Vector{T},tempcosβsinα::Vector{T},tempmindices::Vector{T},cnαβ::Vector{T},cnmαβ::Vector{T})
7979
P = new()
8080
P.CJC = CJC
8181
P.CJI = CJI
@@ -96,8 +96,8 @@ type ChebyshevJacobiPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
9696
P.cnmαβ = cnmαβ
9797
P
9898
end
99-
function ChebyshevJacobiPlan(CJC::ChebyshevJacobiConstants{D,T},CJI::ChebyshevJacobiIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1},um::Vector{T},vm::Vector{T},cfs::Matrix{T}::Vector{T},tempcos::Vector{T},tempsin::Vector{T},tempcosβsinα::Vector{T},tempmindices::Vector{T},cnαβ::Vector{T},cnmαβ::Vector{T},w::Vector{T},anαβ::Vector{T},c_cheb2::Vector{T},pr::Vector{T})
100-
P = ChebyshevJacobiPlan{D,T,DCT,DST}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ)
99+
function ChebyshevJacobiPlan(CJC::ChebyshevJacobiConstants{D,T},CJI::ChebyshevJacobiIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SA,um::Vector{T},vm::Vector{T},cfs::Matrix{T}::Vector{T},tempcos::Vector{T},tempsin::Vector{T},tempcosβsinα::Vector{T},tempmindices::Vector{T},cnαβ::Vector{T},cnmαβ::Vector{T},w::Vector{T},anαβ::Vector{T},c_cheb2::Vector{T},pr::Vector{T})
100+
P = ChebyshevJacobiPlan{D,T,DCT,DST,SA}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ)
101101
P.w = w
102102
P.anαβ = anαβ
103103
P.c_cheb2 = c_cheb2
@@ -114,7 +114,7 @@ end
114114
function ForwardChebyshevJacobiPlan{T}(c_jac::AbstractVector{T}::T::T,M::Int)
115115
# Initialize constants
116116
CJC = ChebyshevJacobiConstants(c_jac,α,β;M=M,D=FORWARD)
117-
if modαβ(α) == 0.5 && modαβ(β) == 0.5 return ChebyshevJacobiPlan{FORWARD,T,Any,Any}(CJC) end
117+
if modαβ(α) == 0.5 && modαβ(β) == 0.5 return ChebyshevJacobiPlan{FORWARD,T,Any,Any,Any}(CJC) end
118118
M,N,nM₀,αN,K = getconstants(CJC)
119119
α,β = modαβ(α),modαβ(β)
120120

@@ -146,13 +146,13 @@ function ForwardChebyshevJacobiPlan{T}(c_jac::AbstractVector{T},α::T,β::T,M::I
146146
# Get indices
147147
CJI = ChebyshevJacobiIndices(α,β,CJC,tempmindices,cfs,tempcos,tempsin,tempcosβsinα)
148148

149-
ChebyshevJacobiPlan{FORWARD,T,typeof(p₁),typeof(p₂)}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ)
149+
ChebyshevJacobiPlan{FORWARD,T,typeof(p₁),typeof(p₂),typeof(c₂)}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ)
150150
end
151151

152152
function BackwardChebyshevJacobiPlan{T}(c_cheb::AbstractVector{T}::T::T,M::Int)
153153
# Initialize constants
154154
CJC = ChebyshevJacobiConstants(c_cheb,α,β;M=M,D=BACKWARD)
155-
if modαβ(α) == 0.5 && modαβ(β) == 0.5 return ChebyshevJacobiPlan{BACKWARD,T,Any,Any}(CJC) end
155+
if modαβ(α) == 0.5 && modαβ(β) == 0.5 return ChebyshevJacobiPlan{BACKWARD,T,Any,Any,Any}(CJC) end
156156
M,N,nM₀,αN,K = getconstants(CJC)
157157
α,β = modαβ(α),modαβ(β)
158158

@@ -191,7 +191,7 @@ function BackwardChebyshevJacobiPlan{T}(c_cheb::AbstractVector{T},α::T,β::T,M:
191191
# Get indices
192192
CJI = ChebyshevJacobiIndices(α,β,CJC,tempmindices,cfs,tempcos,tempsin,tempcosβsinα)
193193

194-
ChebyshevJacobiPlan{BACKWARD,T,typeof(p₁),typeof(p₂)}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ,w,anαβ,c_cheb2,pr)
194+
ChebyshevJacobiPlan{BACKWARD,T,typeof(p₁),typeof(p₂),typeof(c₂)}(CJC,CJI,p₁,p₂,rp,c₁,c₂,um,vm,cfs,θ,tempcos,tempsin,tempcosβsinα,tempmindices,cnαβ,cnmαβ,w,anαβ,c_cheb2,pr)
195195
end
196196

197197
getplanαβ(CJC::ChebyshevJacobiConstants) = CJC.α,CJC.β

src/ChebyshevUltrasphericalPlan.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ function ChebyshevUltrasphericalIndices{D,T}(λ::T,CUC::ChebyshevUltrasphericalC
5353
ChebyshevUltrasphericalIndices(i₁,i₂,j₁,j₂)
5454
end
5555

56-
type ChebyshevUltrasphericalPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
56+
type ChebyshevUltrasphericalPlan{D,T,DCT,DST,SA} <: FastTransformPlan{D,T}
5757
CUC::ChebyshevUltrasphericalConstants{D,T}
5858
CUI::ChebyshevUltrasphericalIndices
5959
p₁::DCT
6060
p₂::DST
6161
rp::RecurrencePlan{T}
6262
c₁::Vector{T}
63-
c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1}
63+
c₂::SA
6464
um::Vector{T}
6565
vm::Vector{T}
6666
θ::Vector{T}
@@ -75,7 +75,7 @@ type ChebyshevUltrasphericalPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
7575
anλ::Vector{T}
7676
c_cheb2::Vector{T}
7777
pr::Vector{T}
78-
function ChebyshevUltrasphericalPlan(CUC::ChebyshevUltrasphericalConstants{D,T},CUI::ChebyshevUltrasphericalIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1},um::Vector{T},vm::Vector{T}::Vector{T},tempsin::Vector{T},tempsin2::Vector{T},tempsinλ::Vector{T},tempsinλm::Vector{T},tempmindices::Vector{T},cnλ::Vector{T},cnmλ::Vector{T})
78+
function ChebyshevUltrasphericalPlan(CUC::ChebyshevUltrasphericalConstants{D,T},CUI::ChebyshevUltrasphericalIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SA,um::Vector{T},vm::Vector{T}::Vector{T},tempsin::Vector{T},tempsin2::Vector{T},tempsinλ::Vector{T},tempsinλm::Vector{T},tempmindices::Vector{T},cnλ::Vector{T},cnmλ::Vector{T})
7979
P = new()
8080
P.CUC = CUC
8181
P.CUI = CUI
@@ -96,8 +96,8 @@ type ChebyshevUltrasphericalPlan{D,T,DCT,DST} <: FastTransformPlan{D,T}
9696
P.cnmλ = cnmλ
9797
P
9898
end
99-
function ChebyshevUltrasphericalPlan(CUC::ChebyshevUltrasphericalConstants{D,T},CUI::ChebyshevUltrasphericalIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SubArray{T,1,Vector{T},Tuple{UnitRange{Int64}},1},um::Vector{T},vm::Vector{T}::Vector{T},tempsin::Vector{T},tempsin2::Vector{T},tempsinλ::Vector{T},tempsinλm::Vector{T},tempmindices::Vector{T},cnλ::Vector{T},cnmλ::Vector{T},w::Vector{T},anλ::Vector{T},c_cheb2::Vector{T},pr::Vector{T})
100-
P = ChebyshevUltrasphericalPlan{D,T,DCT,DST}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ)
99+
function ChebyshevUltrasphericalPlan(CUC::ChebyshevUltrasphericalConstants{D,T},CUI::ChebyshevUltrasphericalIndices,p₁::DCT,p₂::DST,rp::RecurrencePlan{T},c₁::Vector{T},c₂::SA,um::Vector{T},vm::Vector{T}::Vector{T},tempsin::Vector{T},tempsin2::Vector{T},tempsinλ::Vector{T},tempsinλm::Vector{T},tempmindices::Vector{T},cnλ::Vector{T},cnmλ::Vector{T},w::Vector{T},anλ::Vector{T},c_cheb2::Vector{T},pr::Vector{T})
100+
P = ChebyshevUltrasphericalPlan{D,T,DCT,DST,SA}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ)
101101
P.w = w
102102
P.anλ = anλ
103103
P.c_cheb2 = c_cheb2
@@ -114,7 +114,7 @@ end
114114
function ForwardChebyshevUltrasphericalPlan{T}(c_ultra::AbstractVector{T}::T,M::Int)
115115
# Initialize constants
116116
CUC = ChebyshevUltrasphericalConstants(c_ultra,λ;M=M,D=FORWARD)
117-
if modλ(λ) == 0 return ChebyshevUltrasphericalPlan{FORWARD,T,Any,Any}(CUC) end
117+
if modλ(λ) == 0 return ChebyshevUltrasphericalPlan{FORWARD,T,Any,Any,Any}(CUC) end
118118
M,N,nM₀,αN,K = getconstants(CUC)
119119
λ = modλ(λ)
120120

@@ -145,13 +145,13 @@ function ForwardChebyshevUltrasphericalPlan{T}(c_ultra::AbstractVector{T},λ::T,
145145
# Get indices
146146
CUI = ChebyshevUltrasphericalIndices(λ,CUC,tempmindices,tempsin,tempsinλ)
147147

148-
ChebyshevUltrasphericalPlan{FORWARD,T,typeof(p₁),typeof(p₂)}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ)
148+
ChebyshevUltrasphericalPlan{FORWARD,T,typeof(p₁),typeof(p₂),typeof(c₂)}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ)
149149
end
150150

151151
function BackwardChebyshevUltrasphericalPlan{T}(c_ultra::AbstractVector{T}::T,M::Int)
152152
# Initialize constants
153153
CUC = ChebyshevUltrasphericalConstants(c_ultra,λ;M=M,D=BACKWARD)
154-
if modλ(λ) == 0 return ChebyshevUltrasphericalPlan{BACKWARD,T,Any,Any}(CUC) end
154+
if modλ(λ) == 0 return ChebyshevUltrasphericalPlan{BACKWARD,T,Any,Any,Any}(CUC) end
155155
M,N,nM₀,αN,K = getconstants(CUC)
156156
λ = modλ(λ)
157157

@@ -189,7 +189,7 @@ function BackwardChebyshevUltrasphericalPlan{T}(c_ultra::AbstractVector{T},λ::T
189189
# Get indices
190190
CUI = ChebyshevUltrasphericalIndices(λ,CUC,tempmindices,tempsin,tempsinλ)
191191

192-
ChebyshevUltrasphericalPlan{BACKWARD,T,typeof(p₁),typeof(p₂)}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ,w,anλ,c_cheb2,pr)
192+
ChebyshevUltrasphericalPlan{BACKWARD,T,typeof(p₁),typeof(p₂),typeof(c₂)}(CUC,CUI,p₁,p₂,rp,c₁,c₂,um,vm,θ,tempsin,tempsin2,tempsinλ,tempsinλm,tempmindices,cnλ,cnmλ,w,anλ,c_cheb2,pr)
193193
end
194194

195195
getplanλ(CUC::ChebyshevUltrasphericalConstants) = CUC.λ

0 commit comments

Comments
 (0)