Skip to content

Instantly share code, notes, and snippets.

Avatar

Alfonso Landeros alanderos91

View GitHub Profile
@alanderos91
alanderos91 / direct.jl
Created Apr 4, 2018
SSAJumpAggregator Interface
View direct.jl
# this provides only the required fields, but we could in principle add more; e.g. dependency graph
type DirectJumpAggregation{T,F1,F2,RNG} <: SSAJumpAggregator
next_jump::Int
next_jump_time::T
end_time::T
cur_rates::Vector{T}
sum_rate::T
rates::F1
affects!::F2
save_positions::Tuple{Bool,Bool}
@alanderos91
alanderos91 / reaction_network.jl
Created Jun 25, 2017
Implementing @reaction_network
View reaction_network.jl
# inside src/reactions.jl, or a separate file?
import DataStructures: OrderedDict
macro reaction_network(ex)
def_reaction_network(ex)
end
function def_reaction_network(ex::Expr)
reactions = :([])