Skip to content

Commit bdaf8d6

Browse files
interface explicitness
1 parent 792e7b9 commit bdaf8d6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/maketype.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ function maketype(name,
1616
reactions=Vector{ReactionStruct}()
1717
)
1818

19-
typeex = :(mutable struct $name <: AbstractReactionNetwork
19+
typeex = :(mutable struct $name <: DiffEqBase.AbstractReactionNetwork
2020
f::Function
2121
f_func::Vector{Expr}
2222
f_symfuncs::Matrix{SymEngine.Basic}
2323
g::Function
2424
g_func::Vector{Any}
25-
jumps::Tuple{AbstractJump,Vararg{AbstractJump}}
25+
jumps::Tuple{DiffEqJump.AbstractJump,Vararg{DiffEqJump.AbstractJump}}
2626
regular_jumps::RegularJump
2727
jump_rate_expr::Tuple{Any,Vararg{Any}}
2828
jump_affect_expr::Tuple{Vector{Expr},Vararg{Vector{Expr}}}

src/problem.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
### SDEProblem ###
2-
DiffEqBase.SDEProblem(rn::AbstractReactionNetwork, u0::Union{AbstractArray, Number}, args...; kwargs...) =
2+
DiffEqBase.SDEProblem(rn::DiffEqBase.AbstractReactionNetwork, u0::Union{AbstractArray, Number}, args...; kwargs...) =
33
SDEProblem(rn, rn.g, u0, args...;noise_rate_prototype=rn.p_matrix, kwargs...)
44

55
### JumpProblem ###
6-
function DiffEqJump.JumpProblem(prob,aggregator,rn::AbstractReactionNetwork; kwargs...)
6+
function DiffEqJump.JumpProblem(prob,aggregator,rn::DiffEqBase.AbstractReactionNetwork; kwargs...)
77
if typeof(prob)<:DiscreteProblem && any(issubtype.(typeof.(rn.jumps),VariableRateJump))
88
error("When using time dependant reaction rates a DiscreteProblem should not be used (try an ODEProblem). Also, use a continious solver.")
99
end
@@ -28,9 +28,9 @@ function DiffEqJump.JumpProblem(prob,aggregator,rn::AbstractReactionNetwork; kwa
2828
end
2929

3030
### SteadyStateProblem ###
31-
DiffEqBase.SteadyStateProblem(rn::AbstractReactionNetwork, args...; kwargs...) =
31+
DiffEqBase.SteadyStateProblem(rn::DiffEqBase.AbstractReactionNetwork, args...; kwargs...) =
3232
SteadyStateProblem(rn.f, args...; kwargs...)
3333

34-
function DiffEqBase.SteadyStateProblem{isinplace}(rn::AbstractReactionNetwork, args...; kwargs...) where isinplace
34+
function DiffEqBase.SteadyStateProblem{isinplace}(rn::DiffEqBase.AbstractReactionNetwork, args...; kwargs...) where isinplace
3535
SteadyStateProblem{isinplace}(rn.f, args...; kwargs...)
3636
end

0 commit comments

Comments
 (0)