compile_reactions: Precompile the reactions

Description Usage Arguments Value

View source: R/compile_reactions.R

Description

By precompiling the reactions, you can run multiple SSA simulations repeatedly without having to recompile the reactions every time.

Usage

1
2
3
4
5
6
7
8
compile_reactions(
  reactions,
  state_ids,
  params,
  buffer_ids = NULL,
  hardcode_params = FALSE,
  fun_by = 10000L
)

Arguments

reactions

'reaction' A list of multiple reaction() objects.

state_ids

[character] The names of the states in the correct order.

params

[named numeric] Constants that are used in the propensity functions.

buffer_ids

[character] The order of any buffer calculations that are made as part of the propensity functions.

hardcode_params

[logical] Whether or not to hardcode the values of params in the compilation of the propensity functions. Setting this to TRUE will result in a minor sacrifice in accuracy for a minor increase in performance.

fun_by

[integer] Combine this number of propensity functions into one function.

Value

A list of objects solely to be used by ssa().


GillespieSSA2 documentation built on July 14, 2020, 5:08 p.m.