@@ -18,12 +18,12 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
1818 Rational{Int}}[],
1919 save_idxs = nothing ,
2020 save_everystep = isempty (saveat),
21- save_noise = save_everystep && (typeof ( prob. f) <: Tuple ?
21+ save_noise = save_everystep && (prob. f isa Tuple ?
2222 DiffEqBase. has_analytic (prob. f[1 ]) :
2323 DiffEqBase. has_analytic (prob. f)),
2424 save_on = true ,
2525 save_start = save_everystep || isempty (saveat) ||
26- typeof ( saveat) <: Number ? true :
26+ saveat isa Number ? true :
2727 prob. tspan[1 ] in saveat,
2828 save_end = nothing ,
2929 callback = nothing ,
@@ -68,7 +68,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
6868 discontinuity_reltol = 0 , kwargs... ) where {recompile_flag}
6969
7070 # alg = getalg(alg0);
71- if typeof ( prob. f) <: Tuple
71+ if prob. f isa Tuple
7272 if any (mm != I for mm in prob. f. mass_matrix)
7373 error (" This solver is not able to use mass matrices." )
7474 end
@@ -80,7 +80,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
8080 @warn (" Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors." )
8181 end
8282
83- if typeof ( prob. noise) <: NoiseProcess && prob. noise. bridge === nothing && adaptive
83+ if prob. noise isa NoiseProcess && prob. noise. bridge === nothing && adaptive
8484 error (" Bridge function must be given for adaptivity. Either declare this function in noise process or set adaptive=false" )
8585 end
8686
@@ -156,9 +156,9 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
156156 reltol_internal = real .(reltol)
157157 end
158158
159- if isinplace (prob) && typeof (u) <: AbstractArray && eltype (u) <: Number &&
159+ if isinplace (prob) && u isa AbstractArray && eltype (u) <: Number &&
160160 uBottomEltypeNoUnits == uBottomEltype # Could this be more efficient for other arrays?
161- if ! (typeof (u) <: ArrayPartition )
161+ if ! (u isa ArrayPartition)
162162 rate_prototype = recursivecopy (u)
163163 else
164164 rate_prototype = similar (u,
@@ -185,7 +185,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
185185 end
186186
187187 #= TODO : Jump handling
188- if typeof( _prob) <: JumpProblem && _prob.regular_jump !== nothing
188+ if _prob isa JumpProblem && _prob.regular_jump !== nothing
189189
190190 if !isnothing(_prob.regular_jump.mark_dist) == nothing # https://github.com/JuliaDiffEq/DifferentialEquations.jl/issues/250
191191 error("Mark distributions are currently not supported in SimpleTauLeaping")
@@ -256,7 +256,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
256256 else
257257 randElType = uBottomEltypeNoUnits # Strip units and type info
258258 if StochasticDiffEq. is_diagonal_noise (prob)
259- if typeof (u) <: SArray
259+ if u isa SArray
260260 rand_prototype = zero (u) # TODO : Array{randElType} for units
261261 else
262262 rand_prototype = (u .- u) ./ sqrt (oneunit (t))
@@ -306,7 +306,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
306306 reinit! (W, t)
307307 end
308308 # Reseed
309- if typeof (W) <: NoiseProcess && W. reseed
309+ if W isa NoiseProcess && W. reseed
310310 Random. seed! (W. rng, _seed)
311311 end
312312 elseif W. t[end ] != t
@@ -489,7 +489,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
489489 StochasticDiffEq. initialize_callbacks! (integrator, initialize_save)
490490 initialize! (integrator, integrator. cache)
491491
492- save_start && typeof ( alg) <: StochasticDiffEq.StochasticDiffEqCompositeAlgorithm &&
492+ save_start && alg isa StochasticDiffEq. StochasticDiffEqCompositeAlgorithm &&
493493 copyat_or_push! (alg_choice, 1 , integrator. cache. current)
494494 end
495495
@@ -527,7 +527,7 @@ function DiffEqBase.solve!(integrator::SDDEIntegrator)
527527 end
528528 postamble! (integrator)
529529
530- f = typeof ( integrator. sol. prob. f) <: Tuple ? integrator. sol. prob. f[1 ] :
530+ f = integrator. sol. prob. f isa Tuple ? integrator. sol. prob. f[1 ] :
531531 integrator. sol. prob. f
532532
533533 if DiffEqBase. has_analytic (f)
@@ -589,7 +589,7 @@ function tstop_saveat_disc_handling(tstops, saveat, d_discontinuities, tspan,
589589
590590 # saving time points
591591 saveat_internal = BinaryMinHeap {tType} ()
592- if typeof ( saveat) <: Number
592+ if saveat isa Number
593593 if (t0: saveat: tf)[end ] == tf
594594 for t in (t0 + saveat): saveat: tf
595595 push! (saveat_internal, tdir * t)
0 commit comments