Skip to content

Commit bd04678

Browse files
author
Pepijn de Vos
committed
Change typeof(x) <: y to x isa y
1 parent 3ac9aed commit bd04678

26 files changed

+249
-249
lines changed

src/alg_utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ alg_compatible(prob, alg::StochasticDiffEqAlgorithm) = false
155155

156156
function alg_compatible(prob::JumpProblem, alg::StochasticDiffEqAlgorithm)
157157
alg_compatible(prob.prob, alg) && prob.regular_jump === nothing &&
158-
typeof(prob.prob) <: DiffEqBase.AbstractSDEProblem
158+
prob.prob isa DiffEqBase.AbstractSDEProblem
159159
end
160160
alg_compatible(prob::JumpProblem, alg::EM) = alg_compatible(prob.prob, alg)
161161
alg_compatible(prob::JumpProblem, alg::ImplicitEM) = alg_compatible(prob.prob, alg)
@@ -315,7 +315,7 @@ function unwrap_alg(integrator, is_nlsolve)
315315
alg = integrator.alg
316316
if !is_composite(alg)
317317
return alg
318-
elseif typeof(alg.choice_function) <: AutoSwitchCache
318+
elseif alg.choice_function isa AutoSwitchCache
319319
num = is_nlsolve ? 2 : 1
320320
if num == 1
321321
return alg.algs[1]
@@ -342,7 +342,7 @@ function OrdinaryDiffEq.unwrap_alg(integrator::SDEIntegrator, is_stiff)
342342
alg = integrator.alg
343343
if !is_composite(alg)
344344
return alg
345-
elseif typeof(alg.choice_function) <: AutoSwitchCache
345+
elseif alg.choice_function isa AutoSwitchCache
346346
num = is_stiff ? 2 : 1
347347
if num == 1
348348
return alg.algs[1]

src/caches/SROCK_caches.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function alg_cache(alg::SROCK2,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_protot
7979
uᵢ₋₂ = zero(u)
8080
Gₛ = zero(noise_rate_prototype)
8181
Gₛ₁ = zero(noise_rate_prototype)
82-
if typeof(ΔW) <: Union{SArray,Number}
82+
if ΔW isa Union{SArray,Number}
8383
WikRange = copy(ΔW)
8484
vec_χ = copy(ΔW)
8585
else
@@ -125,12 +125,12 @@ function alg_cache(alg::SROCKEM,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_proto
125125
uᵢ₋₁ = zero(u)
126126
uᵢ₋₂ = zero(u)
127127
Gₛ = zero(noise_rate_prototype)
128-
if (!alg.strong_order_1 || is_diagonal_noise(prob) || typeof(ΔW) <: Number || length(ΔW) == 1)
128+
if (!alg.strong_order_1 || is_diagonal_noise(prob) || ΔW isa Number || length(ΔW) == 1)
129129
Gₛ₁ = Gₛ
130130
else
131131
Gₛ₁ = zero(noise_rate_prototype)
132132
end
133-
if typeof(ΔW) <: Union{SArray,Number}
133+
if ΔW isa Union{SArray,Number}
134134
WikRange = copy(ΔW)
135135
else
136136
WikRange = false .* vec(ΔW)
@@ -173,7 +173,7 @@ function alg_cache(alg::SKSROCK,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_proto
173173
Gₛ = zero(noise_rate_prototype)
174174
tmp = uᵢ₋₂ # Dummmy variables
175175
fsalfirst = k
176-
if typeof(ΔW) <: Union{SArray,Number}
176+
if ΔW isa Union{SArray,Number}
177177
WikRange = copy(ΔW)
178178
else
179179
WikRange = false .* vec(ΔW)
@@ -231,7 +231,7 @@ function alg_cache(alg::TangXiaoSROCK2,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rat
231231
uᵢ₋₁ = zero(u)
232232
uᵢ₋₂ = zero(u)
233233
Gₛ = zero(noise_rate_prototype)
234-
if typeof(ΔW) <: Number || length(ΔW) == 1 || is_diagonal_noise(prob)
234+
if ΔW isa Number || length(ΔW) == 1 || is_diagonal_noise(prob)
235235
Gₛ₁ = Gₛ
236236
else
237237
Gₛ₁ = zero(noise_rate_prototype)
@@ -297,7 +297,7 @@ function alg_cache(alg::KomBurSROCK2,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_
297297
Xₛ₋₃ = zero(noise_rate_prototype)
298298
vec_χ = false .* vec(ΔW)
299299
WikRange = false .* vec(ΔW)
300-
if typeof(ΔW) <: Number || length(ΔW) == 1 || is_diagonal_noise(prob)
300+
if ΔW isa Number || length(ΔW) == 1 || is_diagonal_noise(prob)
301301
Gₛ = Xₛ₋₁
302302
SXₛ₋₁ = utmp
303303
SXₛ₋₂ = utmp

src/caches/basic_method_caches.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ end
117117
alg_cache(alg::SimplifiedEM,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{false}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits} = SimplifiedEMConstantCache()
118118

119119
function alg_cache(alg::SimplifiedEM,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
120-
if typeof(ΔW) <: Union{SArray,Number}
120+
if ΔW isa Union{SArray,Number}
121121
_dW = copy(ΔW)
122122
else
123123
_dW = zero(ΔW)

src/caches/kencarp_caches.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ function alg_cache(alg::SKenCarp,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prot
4242
atmp = fill!(similar(u,uEltypeNoUnits),0)
4343
z₁ = similar(u); z₂ = similar(u)
4444
z₃ = similar(u); z₄ = nlsolver.z
45-
if typeof(f) <: SplitSDEFunction
45+
if f isa SplitSDEFunction
4646
k1 = zero(u); k2 = zero(u)
4747
k3 = zero(u); k4 = zero(u)
4848
else
4949
k1 = nothing; k2 = nothing
5050
k3 = nothing; k4 = nothing
5151
end
5252

53-
if typeof(ΔW) <: Union{SArray,Number}
53+
if ΔW isa Union{SArray,Number}
5454
chi2 = copy(ΔW)
5555
else
5656
chi2 = zero(ΔW)

src/caches/rossler_caches.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function alg_cache(alg::SRI,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype
7272
E₁ = zero(rate_prototype); E₂ = zero(rate_prototype); E₁temp = zero(rate_prototype)
7373
ftemp = zero(rate_prototype); gtemp = zero(rate_prototype)
7474

75-
if typeof(ΔW) <: Union{SArray,Number}
75+
if ΔW isa Union{SArray,Number}
7676
chi1 = copy(ΔW)
7777
chi2 = copy(ΔW)
7878
chi3 = copy(ΔW)
@@ -118,7 +118,7 @@ alg_cache(alg::SRIW1,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_r
118118
end
119119

120120
function alg_cache(alg::SRIW1,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
121-
if typeof(ΔW) <: Union{SArray,Number}
121+
if ΔW isa Union{SArray,Number}
122122
chi1 = copy(ΔW)
123123
chi2 = copy(ΔW)
124124
chi3 = copy(ΔW)
@@ -417,7 +417,7 @@ end
417417
function alg_cache(alg::SRIW2,prob,u,ΔW,ΔZ,p,rate_prototype,
418418
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
419419
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
420-
if typeof(ΔW) <: Union{SArray,Number}
420+
if ΔW isa Union{SArray,Number}
421421
chi1 = copy(ΔW)
422422
chi2 = copy(ΔW)
423423
chi3 = copy(ΔW)
@@ -439,7 +439,7 @@ end
439439
function alg_cache(alg::SOSRI,prob,u,ΔW,ΔZ,p,rate_prototype,
440440
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
441441
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
442-
if typeof(ΔW) <: Union{SArray,Number}
442+
if ΔW isa Union{SArray,Number}
443443
chi1 = copy(ΔW)
444444
chi2 = copy(ΔW)
445445
chi3 = copy(ΔW)
@@ -461,7 +461,7 @@ end
461461
function alg_cache(alg::SOSRI2,prob,u,ΔW,ΔZ,p,rate_prototype,
462462
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
463463
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
464-
if typeof(ΔW) <: Union{SArray,Number}
464+
if ΔW isa Union{SArray,Number}
465465
chi1 = copy(ΔW)
466466
chi2 = copy(ΔW)
467467
chi3 = copy(ΔW)

src/caches/sra_caches.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ alg_cache(alg::SRA1,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_ra
1616
end
1717

1818
function alg_cache(alg::SRA1,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
19-
if typeof(ΔW) <: Union{SArray,Number}
19+
if ΔW isa Union{SArray,Number}
2020
chi2 = copy(ΔW)
2121
else
2222
chi2 = zero(ΔW)
@@ -78,7 +78,7 @@ end
7878
function alg_cache(alg::SRA2,prob,u,ΔW,ΔZ,p,rate_prototype,
7979
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
8080
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
81-
if typeof(ΔW) <: Union{SArray,Number}
81+
if ΔW isa Union{SArray,Number}
8282
chi2 = copy(ΔW)
8383
else
8484
chi2 = zero(ΔW)
@@ -227,7 +227,7 @@ end
227227
function alg_cache(alg::SRA3,prob,u,ΔW,ΔZ,p,rate_prototype,
228228
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
229229
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
230-
if typeof(ΔW) <: Union{SArray,Number}
230+
if ΔW isa Union{SArray,Number}
231231
chi2 = copy(ΔW)
232232
else
233233
chi2 = zero(ΔW)
@@ -250,7 +250,7 @@ end
250250
function alg_cache(alg::SOSRA,prob,u,ΔW,ΔZ,p,rate_prototype,
251251
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
252252
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
253-
if typeof(ΔW) <: Union{SArray,Number}
253+
if ΔW isa Union{SArray,Number}
254254
chi2 = copy(ΔW)
255255
else
256256
chi2 = zero(ΔW)
@@ -273,7 +273,7 @@ end
273273
function alg_cache(alg::SOSRA2,prob,u,ΔW,ΔZ,p,rate_prototype,
274274
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
275275
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
276-
if typeof(ΔW) <: Union{SArray,Number}
276+
if ΔW isa Union{SArray,Number}
277277
chi2 = copy(ΔW)
278278
else
279279
chi2 = zero(ΔW)
@@ -347,7 +347,7 @@ function alg_cache(alg::SRA,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype
347347
end
348348
A0temp = zero(rate_prototype); B0temp = zero(rate_prototype)
349349
ftmp = zero(rate_prototype); gtmp = zero(noise_rate_prototype);
350-
if typeof(ΔW) <: Union{SArray,Number}
350+
if ΔW isa Union{SArray,Number}
351351
chi2 = copy(ΔW)
352352
else
353353
chi2 = zero(ΔW)

src/caches/srk_weak_caches.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ end
583583
function alg_cache(alg::DRI1,prob,u,ΔW,ΔZ,p,rate_prototype,
584584
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
585585
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
586-
if typeof(ΔW) <: Union{SArray,Number}
586+
if ΔW isa Union{SArray,Number}
587587
_dW = copy(ΔW)
588588
_dZ = copy(ΔW)
589589
chi1 = copy(ΔW)
@@ -628,7 +628,7 @@ function alg_cache(alg::DRI1NM,prob,u,ΔW,ΔZ,p,rate_prototype,
628628
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
629629
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
630630

631-
if typeof(ΔW) <: Union{SArray,Number}
631+
if ΔW isa Union{SArray,Number}
632632
_dW = copy(ΔW)
633633
chi1 = copy(ΔW)
634634
else
@@ -664,7 +664,7 @@ end
664664
function alg_cache(alg::RI1,prob,u,ΔW,ΔZ,p,rate_prototype,
665665
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
666666
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
667-
if typeof(ΔW) <: Union{SArray,Number}
667+
if ΔW isa Union{SArray,Number}
668668
_dW = copy(ΔW)
669669
_dZ = copy(ΔW)
670670
chi1 = copy(ΔW)
@@ -709,7 +709,7 @@ end
709709
function alg_cache(alg::RI3,prob,u,ΔW,ΔZ,p,rate_prototype,
710710
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
711711
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
712-
if typeof(ΔW) <: Union{SArray,Number}
712+
if ΔW isa Union{SArray,Number}
713713
_dW = copy(ΔW)
714714
_dZ = copy(ΔW)
715715
chi1 = copy(ΔW)
@@ -754,7 +754,7 @@ end
754754
function alg_cache(alg::RI5,prob,u,ΔW,ΔZ,p,rate_prototype,
755755
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
756756
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
757-
if typeof(ΔW) <: Union{SArray,Number}
757+
if ΔW isa Union{SArray,Number}
758758
_dW = copy(ΔW)
759759
_dZ = copy(ΔW)
760760
chi1 = copy(ΔW)
@@ -799,7 +799,7 @@ end
799799
function alg_cache(alg::RI6,prob,u,ΔW,ΔZ,p,rate_prototype,
800800
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
801801
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
802-
if typeof(ΔW) <: Union{SArray,Number}
802+
if ΔW isa Union{SArray,Number}
803803
_dW = copy(ΔW)
804804
_dZ = copy(ΔW)
805805
chi1 = copy(ΔW)
@@ -843,7 +843,7 @@ end
843843
function alg_cache(alg::RDI2WM,prob,u,ΔW,ΔZ,p,rate_prototype,
844844
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
845845
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
846-
if typeof(ΔW) <: Union{SArray,Number}
846+
if ΔW isa Union{SArray,Number}
847847
_dW = copy(ΔW)
848848
_dZ = copy(ΔW)
849849
chi1 = copy(ΔW)
@@ -889,7 +889,7 @@ end
889889
function alg_cache(alg::RDI3WM,prob,u,ΔW,ΔZ,p,rate_prototype,
890890
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
891891
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
892-
if typeof(ΔW) <: Union{SArray,Number}
892+
if ΔW isa Union{SArray,Number}
893893
_dW = copy(ΔW)
894894
_dZ = copy(ΔW)
895895
chi1 = copy(ΔW)
@@ -935,7 +935,7 @@ end
935935
function alg_cache(alg::RDI4WM,prob,u,ΔW,ΔZ,p,rate_prototype,
936936
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
937937
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
938-
if typeof(ΔW) <: Union{SArray,Number}
938+
if ΔW isa Union{SArray,Number}
939939
_dW = copy(ΔW)
940940
_dZ = copy(ΔW)
941941
chi1 = copy(ΔW)
@@ -1068,7 +1068,7 @@ end
10681068
function alg_cache(alg::RDI1WM,prob,u,ΔW,ΔZ,p,rate_prototype,
10691069
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
10701070
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1071-
if typeof(ΔW) <: Union{SArray,Number}
1071+
if ΔW isa Union{SArray,Number}
10721072
_dW = copy(ΔW)
10731073
chi1 = copy(ΔW)
10741074
else
@@ -1290,7 +1290,7 @@ end
12901290
function alg_cache(alg::RS1,prob,u,ΔW,ΔZ,p,rate_prototype,
12911291
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
12921292
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1293-
if typeof(ΔW) <: Union{SArray,Number}
1293+
if ΔW isa Union{SArray,Number}
12941294
_dW = copy(ΔW)
12951295
_dZ = copy(ΔW)
12961296
chi1 = copy(ΔW)
@@ -1333,7 +1333,7 @@ end
13331333
function alg_cache(alg::RS2,prob,u,ΔW,ΔZ,p,rate_prototype,
13341334
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
13351335
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1336-
if typeof(ΔW) <: Union{SArray,Number}
1336+
if ΔW isa Union{SArray,Number}
13371337
_dW = copy(ΔW)
13381338
_dZ = copy(ΔW)
13391339
chi1 = copy(ΔW)
@@ -1435,7 +1435,7 @@ end
14351435
function alg_cache(alg::PL1WM,prob,u,ΔW,ΔZ,p,rate_prototype,
14361436
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
14371437
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1438-
if typeof(ΔW) <: Union{SArray,Number}
1438+
if ΔW isa Union{SArray,Number}
14391439
_dW = copy(ΔW)
14401440
_dZ = copy(ΔZ)
14411441
chi1 = copy(ΔW)
@@ -1491,7 +1491,7 @@ end
14911491
function alg_cache(alg::PL1WMA,prob,u,ΔW,ΔZ,p,rate_prototype,
14921492
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
14931493
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1494-
if typeof(ΔW) <: Union{SArray,Number}
1494+
if ΔW isa Union{SArray,Number}
14951495
_dW = copy(ΔW)
14961496
chi1 = copy(ΔW)
14971497
else
@@ -1656,7 +1656,7 @@ end
16561656
function alg_cache(alg::NON,prob,u,ΔW,ΔZ,p,rate_prototype,
16571657
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
16581658
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1659-
if typeof(ΔW) <: Union{SArray,Number}
1659+
if ΔW isa Union{SArray,Number}
16601660
_dW = copy(ΔW)
16611661
_dZ = copy(ΔW)
16621662
chi1 = copy(ΔW)
@@ -1803,7 +1803,7 @@ end
18031803
function alg_cache(alg::COM,prob,u,ΔW,ΔZ,p,rate_prototype,
18041804
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
18051805
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1806-
if typeof(ΔW) <: Union{SArray,Number}
1806+
if ΔW isa Union{SArray,Number}
18071807
_dW = copy(ΔW)
18081808
else
18091809
_dW = zero(ΔW)
@@ -1960,7 +1960,7 @@ end
19601960
function alg_cache(alg::NON2,prob,u,ΔW,ΔZ,p,rate_prototype,
19611961
noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},
19621962
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
1963-
if typeof(ΔW) <: Union{SArray,Number}
1963+
if ΔW isa Union{SArray,Number}
19641964
_dW = copy(ΔW)
19651965
_dZ = copy(ΔW)
19661966
chi1 = copy(ΔW)
@@ -2212,7 +2212,7 @@ function alg_cache(alg::SIEA,prob,u,ΔW,ΔZ,p,rate_prototype,
22122212
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
22132213

22142214

2215-
if typeof(ΔW) <: Union{SArray,Number}
2215+
if ΔW isa Union{SArray,Number}
22162216
W2 = copy(ΔW)
22172217
W3 = copy(ΔW)
22182218
else
@@ -2241,7 +2241,7 @@ function alg_cache(alg::SMEA,prob,u,ΔW,ΔZ,p,rate_prototype,
22412241
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
22422242

22432243

2244-
if typeof(ΔW) <: Union{SArray,Number}
2244+
if ΔW isa Union{SArray,Number}
22452245
W2 = copy(ΔW)
22462246
W3 = copy(ΔW)
22472247
else
@@ -2269,7 +2269,7 @@ function alg_cache(alg::SIEB,prob,u,ΔW,ΔZ,p,rate_prototype,
22692269
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
22702270

22712271

2272-
if typeof(ΔW) <: Union{SArray,Number}
2272+
if ΔW isa Union{SArray,Number}
22732273
W2 = copy(ΔW)
22742274
W3 = copy(ΔW)
22752275
else
@@ -2297,7 +2297,7 @@ function alg_cache(alg::SMEB,prob,u,ΔW,ΔZ,p,rate_prototype,
22972297
::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
22982298

22992299

2300-
if typeof(ΔW) <: Union{SArray,Number}
2300+
if ΔW isa Union{SArray,Number}
23012301
W2 = copy(ΔW)
23022302
W3 = copy(ΔW)
23032303
else

0 commit comments

Comments
 (0)