1- function solve {uType,tType,isinplace,AlgType<:BridgeAlgorithm} (
2- prob:: Union {AbstractODEProblem{uType,tType,isinplace},
3- AbstractSDEProblem{uType,tType,isinplace}},
1+ function solve (
2+ prob:: Union {DiffEqBase . AbstractODEProblem{uType,tType,isinplace},
3+ DiffEqBase . AbstractSDEProblem{uType,tType,isinplace}},
44 alg:: AlgType ,
55 timeseries= [],ts= [],ks= [];
66 verbose= true ,
77 dt = nothing ,
88 timeseries_errors= true ,
9- callback= nothing ,kwargs... )
9+ callback= nothing ,kwargs... ) where {uType,tType,isinplace,AlgType <: BridgeAlgorithm }
1010
1111 if dt == nothing
1212 error (" dt required for fixed timestep methods." )
@@ -17,7 +17,7 @@ function solve{uType,tType,isinplace,AlgType<:BridgeAlgorithm}(
1717 warned && warn_compat ()
1818 end
1919
20- if prob . callback != nothing || callback != nothing
20+ if callback != nothing || : callback in keys (prob . kwargs)
2121 error (" Bridge is not compatible with callbacks." )
2222 end
2323
@@ -26,12 +26,12 @@ function solve{uType,tType,isinplace,AlgType<:BridgeAlgorithm}(
2626
2727 if isinplace
2828 f = (t,u) -> (du = similar (u); prob. f (du,u,p,t); Diagonal (du))
29- if typeof (prob) <: AbstractSDEProblem
29+ if typeof (prob) <: DiffEqBase. AbstractSDEProblem
3030 g = (t,u) -> (du = similar (u); prob. g (du,u,p,t,u); Diagonal (du))
3131 end
3232 else
3333 f = (t,u) -> prob. f (u,p,t)
34- if typeof (prob) <: AbstractSDEProblem
34+ if typeof (prob) <: DiffEqBase. AbstractSDEProblem
3535 if typeof (u0) <: Number
3636 g = (t,u) -> prob. g (u,p,t)
3737 else
@@ -41,7 +41,7 @@ function solve{uType,tType,isinplace,AlgType<:BridgeAlgorithm}(
4141 end
4242
4343 t = prob. tspan[1 ]: dt: prob. tspan[2 ]
44- if typeof (prob) <: AbstractSDEProblem
44+ if typeof (prob) <: DiffEqBase. AbstractSDEProblem
4545 W = Bridge. samplepath (t, zero (u0))
4646 samp = Bridge. sample (t, Bridge. Wiener {typeof(u0)} ())
4747 if typeof (alg) <: BridgeEuler
@@ -54,7 +54,7 @@ function solve{uType,tType,isinplace,AlgType<:BridgeAlgorithm}(
5454 error (" BridgeSRK is not compatible with non Number types" )
5555 end
5656 else # ODE
57- samp = Bridge. SamplePath (t,Vector {typeof(u0)} (length (t)))
57+ samp = Bridge. SamplePath (t,Vector {typeof(u0)} (undef, length (t)))
5858 W = nothing
5959 if typeof (alg) <: BridgeR3
6060 u = Bridge. solve! (Bridge. R3 (),samp,u0,f)
@@ -63,7 +63,7 @@ function solve{uType,tType,isinplace,AlgType<:BridgeAlgorithm}(
6363 end
6464 end
6565
66- build_solution (prob, alg, u. tt, u. yy,
66+ DiffEqBase . build_solution (prob, alg, u. tt, u. yy,
6767 W = W,
6868 timeseries_errors = timeseries_errors,
6969 retcode = :Success )
0 commit comments