A stochastic modeling library written in C++ for Python and R