Skip to content

Commit 5567599

Browse files
feat: add constructorof for SDDEProblem
1 parent 4942396 commit 5567599

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/problems/sdde_problems.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,17 @@ 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,
163+
noise_rate_prototype, seed, neutral, order_discontinuity_t0)
164+
if f isa AbstractSDDEFunction
165+
iip = isinplace(f)
166+
else
167+
iip = isinplace(f, 5)
168+
end
169+
return SDDEProblem{iip}(
170+
f, g, u0, h, tspan, p; kw..., noise, constant_lags, dependent_lags,
171+
noise_rate_prototype, seed, neutral, order_discontinuity_t0)
172+
end
173+
end

0 commit comments

Comments
 (0)