A basic Markov chain class for C++