Final version of old implementation. Next work will only concern N-Dimensional Markov chains.