Skip to content

Commit 4f3745b

Browse files
feat: add constructorof for SDDEProblem
1 parent 8739c02 commit 4f3745b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/problems/sdde_problems.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,15 @@ end
157157
function SDDEProblem(f::AbstractSDDEFunction, args...; kwargs...)
158158
SDDEProblem{isinplace(f)}(f, args...; kwargs...)
159159
end
160+
161+
function ConstructionBase.constructorof(::Type{P}) where {P <: SDDEProblem}
162+
function ctor(f, g, u0, h, tspan, p, noise, constant_lags, dependent_lags, kw, noise_rate_prototype, seed, neutral, order_discontinuity_t0)
163+
if f isa AbstractSDDEFunction
164+
iip = isinplace(f)
165+
else
166+
iip = isinplace(f, 5)
167+
end
168+
return SDDEProblem{iip}(f, g, u0, h, tspan, p; kw..., noise, constant_lags, dependent_lags, noise_rate_prototype, seed, neutral, order_discontinuity_t0)
169+
end
170+
end
171+

0 commit comments

Comments
 (0)