Skip to content
/ gillrocky Public

An implementation of the Gillespie algorithm.

License

Notifications You must be signed in to change notification settings

jabr/gillrocky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gillrocky

Rocket Gillespie

An implementation of the Gillespie algorithm in Rust.

a discrete, stochastic process instead of a continuous, deterministic process[a]

Example

cargo build
cargo run
use gillrocky::{Reactor, Process};

struct State { ... }
struct Reaction { ... }

impl Process<State> for Reaction {
  fn rate(&self, state: &State) -> f64 { ... }
  fn perform(&mut self, state: &mut State) { ... }
}

let mut reactor = Reactor::new(seed);
reactor.add(Reaction { ... });
reactor.add(Reaction { ... });

let state = State { ... };
loop {
  reactor.step(&mut state);
  // output: reactor.time, state.*, etc
}

See also

References

License

This project is licensed under the terms of the MIT license.

Icon derived from work by Selman Design.

About

An implementation of the Gillespie algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages