Skip to content

Instantly share code, notes, and snippets.

// NB written for Linux g++, replace the #include with indiv. headers if required.
// C++11 used.
#include <bits/stdc++.h>
using namespace std;
#define LOG_DEBUG 0 // enable debug
#define debug if (!LOG_DEBUG) {} else cerr
@lhl2617
lhl2617 / sir.js
Last active April 5, 2020 13:04
Simple SIR model with JS and Python
// by lhreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (I don't remember how many e's)
// NOTE I might've edited sections for correctness/improvements/issues!
/*
Please first copy & paste the contents, starting from line 5, from
https://github.com/scijs/ode-rk4/blob/master/lib/index.js
<for the motivated>
...alternatively you can use the npm package and install `ode-rk4` and use