C++ Implementation of a Markov Chain.